Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] vmmap command 'offset' column actually shows size #1096

Open
1 of 9 tasks
mjklbhvg opened this issue Apr 27, 2024 · 0 comments
Open
1 of 9 tasks

[Bug] vmmap command 'offset' column actually shows size #1096

mjklbhvg opened this issue Apr 27, 2024 · 0 comments

Comments

@mjklbhvg
Copy link

GEF+GDB version

GEF: (Standalone)
Blob Hash(/home/fr/.config/gdb/gdbinit-gef.py): a069c75625fe1fe9f520e638094737b037c1a9f6
SHA256(/home/fr/.config/gdb/gdbinit-gef.py): 5499dc017dc390105601a94323ed2b87f6ea407625dadb39c5b36a85be60a975
GDB: 14.2
GDB-Python: 3.12

Operating System

LSB Version: 1.0 Distributor ID: VoidLinux Description: Void Linux Release: rolling Codename: void

Describe the issue you encountered

As the title says, the column "offset" in the vmmap output appears to actually show section size.
I am pretty sure this happened in this commit:
c9a8b18

I can reproduce with this commit, but not the commit before.

Do you read the docs and look at previously closed issues/PRs for similar cases?

No

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.

gdb /bin/ls
start
vmmap

Start              End                Offset             Perm Path
0x0000555555554000 0x0000555555558000 0x0000000000004000 r-- /usr/bin/ls
0x0000555555558000 0x000055555556e000 0x0000000000016000 r-x /usr/bin/ls
0x000055555556e000 0x0000555555577000 0x0000000000009000 r-- /usr/bin/ls
0x0000555555577000 0x0000555555579000 0x0000000000002000 r-- /usr/bin/ls
0x0000555555579000 0x000055555557a000 0x0000000000001000 rw- /usr/bin/ls

info proc mappings

process 15347
Mapped address spaces:

          Start Addr           End Addr       Size     Offset  Perms  objfile
      0x555555554000     0x555555558000     0x4000        0x0  r--p   /usr/bin/ls
      0x555555558000     0x55555556e000    0x16000     0x4000  r-xp   /usr/bin/ls
      0x55555556e000     0x555555577000     0x9000    0x1a000  r--p   /usr/bin/ls
      0x555555577000     0x555555579000     0x2000    0x23000  r--p   /usr/bin/ls
      0x555555579000     0x55555557a000     0x1000    0x25000  rw-p   /usr/bin/ls

Minimalist test case

No response

Additional context?

  • Screenshots
  • Callstack
  • Coredumps
  • If possible and useful, please upload the binary
mjklbhvg pushed a commit to mjklbhvg/gef that referenced this issue May 1, 2024
mjklbhvg pushed a commit to mjklbhvg/gef that referenced this issue May 1, 2024
Fix the Offset column in the `vmmap` command by getting the offset
from the correct column in `parse_gdb_info_proc_maps`.
mjklbhvg added a commit to mjklbhvg/gef that referenced this issue May 1, 2024
Fix the Offset column in the `vmmap` command by getting the offset
from the correct column in `parse_gdb_info_proc_maps`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant