Load a basic program that calls malloc a couple of times, and break in gdb right after. Running heap arenas at that point shows garbage because the malloc_state memory layout has changed (doesn't match with p main_arena).
gef➤ heap arenas
Arena(base=0x7ffff7e13ac0, top=0x7ffff7e13b08, last_remainder=0x7ffff7e13b18, next=0x0, mem=1, mempeak=2)
gef➤ p main_arena
$1 = {
mutex = 0x0,
flags = 0x0,
top = 0x5555555591b0,
last_remainder = 0x0,
bins = {0x7ffff7e13ac8 <main_arena+8>, 0x7ffff7e13ac8 <main_arena+8>, 0x7ffff7e13ad8 <main_arena+24>, 0x7ffff7e13ad8 <main_arena+24>, 0x7ffff7e13ae8 <main_arena+40>,
0x7ffff7e13ae8 <main_arena+40>, 0x7ffff7e13af8 <main_arena+56>, 0x7ffff7e13af8 <main_arena+56>, 0x7ffff7e13b08 <main_arena+72>, 0x7ffff7e13b08 <main_arena+72>,
0x7ffff7e13b18 <main_arena+88>, 0x7ffff7e13b18 <main_arena+88>, 0x7ffff7e13b28 <main_arena+104>, 0x7ffff7e13b28 <main_arena+104>, 0x7ffff7e13b38 <main_arena+120>,
...
GEF+GDB version
Operating System
Arch Linux
Describe the issue you encountered
Glibc has removed fastbins.
Do you read the docs and look at previously closed issues/PRs for similar cases?
Yes
Architecture impacted
Describe your issue. Without a proper reproduction step-by-step, your issue will be ignored.
Load a basic program that calls malloc a couple of times, and break in gdb right after. Running
heap arenasat that point shows garbage because themalloc_statememory layout has changed (doesn't match withp main_arena).Minimalist test case
Additional context?
Notice
top/last_remainderdon't match: