-
Notifications
You must be signed in to change notification settings - Fork 849
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
gsbase command ValueError: Unknown register. #1572
Comments
So which commit did break this? ;) |
Total of 490 commits between that a current dev HEAD and last known good. I would have loved to narrow it down a bit more, unfortunately I can't right now 😢 <<part edited by Disconnect3d to remove 490 lines with commit ids :P>> |
This can be automated with some |
Before this fix, when we compiled a 32-bit prgoram a 'Bad register' bug would show up on `fsbase` and `gsbase` commands. Also, those commands weren't protected to not be executed on another archs, which this commit fixes. Additionally, this commit introduces 4 tests: ``` test_commands_segments[gsbase-gosample.x64] PASSED test_commands_segments[gsbase-gosample.x86] PASSED test_commands_segments[fsbase-gosample.x64] PASSED test_commands_segments[fsbase-gosample.x86] PASSED ``` Two of those tests, the ones with x86 binaries, applied without other changes would fail.
Turned out the registers could not be retrieved with GDB's read register function on 32-bit binaries but the arch_prctl method we use works fine on 32-bit, so I applied a fix for this in #1575 |
@disconnect3d thank you. |
Description
Steps to reproduce
I was following class videos on using pwndbg to look for stack canary values. Compile the following sample crackme with
gcc -m32 -g -O0 -mpreferred-stack-boundary=2 -fstack-protector -o crackme0x00-ssp-exec -z execstack crackme0x00.c
Open file with pwndbg
With pwndbg set a breakpoint and run the file as follows
Type the
gsbase
command afterNotice the ValueError: Unknown register error.
Gdb session history:
My setup
Traceback
If I go all the way back to this commit
b203d53b8a01c016dc5536854320ca39b81a92b1
the same command works.I also tried with the latest(as at bug report) release tag commit hash
git checkout 894f6e2103d69777a944c544d203d28559331057
and it also failsThe text was updated successfully, but these errors were encountered: