Tcache Poisoning — Allocation arbitraire
★★★★★
Qu'est-ce que le Tcache ?
Depuis glibc 2.26, chaque thread a son propre cache de blocs libérés (tcache) pour de meilleures performances. En modifiant le pointeur fd d'un chunk libre (via UAF ou overflow), on peut faire retourner un malloc vers n'importe quelle adresse.
Exploitation
# Modifier chunk->fd pour pointer vers target_addr
# (via UAF sur ce chunk après free)
# 1er malloc -> retourne chunk normal
# 2ème malloc -> retourne target_addr !
# On peut maintenant écrire à target_addr
# Mitigations :
# glibc 2.32 : XOR du pointeur fd avec la position
# glibc 2.34 : safe-linking + vérifications supplémentaires