You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The heap chunks command does not work properly when setting GLIBC_TUNABLES, e.g., glibc.malloc.tcache_count or glibc.malloc.arena_max when symbols ARE available for the linked glibc (the command works if the symbols are not available).
The reason for this is that GefHeapManager.base_address uses mp_->sbrk_base if symbols are available in the glibc to find the base address of the heap. This value does not point to the beginning of the heap section when some GLIBC_TUNABLES are set.
Do you read the docs and look at previously closed issues/PRs for similar cases?
Yes
Architecture impacted
X86
X64
ARM
ARM64
MIPS
MIPS64
PPC
PPC64
RISCV
Describe your issue. Without a proper reproduction step-by-step, your issue will be ignored.
start GEF/GDB with e.g. the /tmp/heap-non-main.out binary from the test suite
set exec-wrapper env GLIBC_TUNABLES=glibc.malloc.tcache_count=0
run
p mp_->sbrk_base
The last returned value from the above commands does not correspond to the output of vmmap heap.
Minimalist test case
See heap-non-main.c from the test suite
Additional context?
No response
The text was updated successfully, but these errors were encountered:
GEF+GDB version
Operating System
Ubuntu 20.04.5 LTS
Describe the issue you encountered
The
heap chunks
command does not work properly when settingGLIBC_TUNABLES
, e.g.,glibc.malloc.tcache_count
orglibc.malloc.arena_max
when symbols ARE available for the linked glibc (the command works if the symbols are not available).The reason for this is that
GefHeapManager.base_address
usesmp_->sbrk_base
if symbols are available in the glibc to find the base address of the heap. This value does not point to the beginning of theheap
section when someGLIBC_TUNABLES
are set.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.
/tmp/heap-non-main.out
binary from the test suiteset exec-wrapper env GLIBC_TUNABLES=glibc.malloc.tcache_count=0
run
p mp_->sbrk_base
The last returned value from the above commands does not correspond to the output of
vmmap heap
.Minimalist test case
See
heap-non-main.c
from the test suiteAdditional context?
No response
The text was updated successfully, but these errors were encountered: