Why the Hooks Went Away
- For years,
__free_hookand__malloc_hookwere the easiest "one write to shell" targets: writable function pointers called on every allocation event. - They existed for debugging and custom allocators — a legitimate feature abused into a universal exploit target.
- glibc 2.34 (2021) removed them. This is a deliberate attack-surface reduction: delete the feature, delete the technique.
- Attackers adapted (as always) to file-stream vtables and exit handlers — but those require more setup and more checks to pass.
Key Takeaway
Removing a convenient target is itself a mitigation. The arms race continues: fewer easy wins, more elaborate chains.