-
-
Notifications
You must be signed in to change notification settings - Fork 755
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
Determine the actual canary location #918
Conversation
Failure looks unrelated, but my other PR passed so I'm unsure |
A couple things I'm not sure how to deal with
|
Yes, just noticed via your change, missed this comment. We also do this for a couple other things e.g. pagesize. How often is this function called? We probably shouldn't cache. |
It might be worth only caching/checking cache in the exception case - the address of |
Let's not cache, and figure out what to do in #919. |
fab27cd
to
7a0c42b
Compare
2bd0c1b
to
c3c4f0a
Compare
Still no idea about the failing tests :/ It looks persistent, but dev seems to be passed fine |
You're writing a 4 byte canary and testing for it, It'll fail if there is anything but 0s in the other 4 bytes.
|
The other test is failing because you very slightly lower the coverage score... @hugsy should probably fix it, it's way too stringent right now. |
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.
Good idea, minor stuff to change before we can merge.
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.
LGTM
Description/Motivation/Screenshots
This PR adds arch-specific methods to find the actual canary location, as stored in
$fs_base+0x28
on x86_64.This allows printing the in-use canary location, which can help with exploits that involve overwriting the canonical canary.
I wasn't able to find a way to read the
gs
segment on 32-bit, so currently this PR only adds functionality to x86_64.Against which architecture was this tested ?
"Tested" indicates that the PR works and the unit test (see
docs/testing.md
) run passes without issue.Checklist
dev
branch, notmain
.