-
Notifications
You must be signed in to change notification settings - Fork 114
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
workaround for issue #100 #126
Conversation
Using link-args, we force the load address for the executable to be higher than the shadow memory area required by address sanitizer.
@Manishearth @nagisa Are either of you familiar with what's going on here? I'm not the best reviewer for this |
not entirely. Makes some sense looking at google/sanitizers#837 but I'm not entirely sure this is the right fix. |
What this commit does is the following. Usually, the memory map of a rust exe at runtime would looks like this:
The problem now is that
Note that this means that the code is always loaded at the same address (this makes exploiting buffer overflows etc easier, but it should not be a problem since fuzzing is not run against user data?), but it guarantees that it won't collid with the shadow memory space. Possible questions:
Other possible solutions:
Of course, ideally this would be fixed in |
I’m generally against such workarounds for several reasons:
OTOH this comes with benefits as well, such as disablement of ASLR which results in more reproducible runs, so I’m only slightly against. |
@nagisa I'm not sure that this can be fixed in the sanitizer / kernel. ASan needs a bit of memory for book keeping, and it appears that hardcoding this location is necessary for performance (upstream mentioned that they did not want to make it configurable because performance would suffer too much). So the only "upstream" that could fix this would be rustc. |
The platform-specificness is definitely an issue though. Perhaps we should go with |
Anyone opposed to closing this? |
Has the bug been fixed? It's been a long time, I have not kept up with the latest developments in these areas. However, I guess this particular PR can be closed anyway, since that's not the approach anybody seems to want to take. |
Using link-args, we force the load address for the executable to be higher than
the shadow memory area required by address sanitizer.