-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Synthesize fault_addr on amd64 if it is zero. #1031
Conversation
2bced14
to
68eb054
Compare
Fixes Gallopsled/pwntool#1018
68eb054
to
e3627c3
Compare
Yep, works fine.
|
>>> io = elf.process() | ||
>>> io.wait() | ||
>>> io.corefile.fault_addr | ||
1234 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not a good test if I understand the issue correctly. From my tests, it seems that fault_addr
was only null before this patch if it would've been >= 2**47
. This is because on 64 bit, that's where kernel memory is mapped so we get "protection fault" instead of "segfault". A protection fault does not have the same siginfo
as a normal segfault: si_code
will be SI_KERNEL = 0x80
and there won't be a fault_addr
(see http://elixir.free-electrons.com/linux/v4.14-rc8/source/kernel/signal.c#L1052)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in #1031
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Err Fixed in #1066
Fixes Gallopsled/pwntool#1018