-
-
Notifications
You must be signed in to change notification settings - Fork 324
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
Memory safety issue in frida fuzzer breaks Windows CI #1383
Comments
thanks for the investigation do you think this is related? i feel it is. here i tried to make FridaInstrumentationHelper return Result<>, but it simply doesn't work (which is suprising) |
Using a |
Yeah i know. I mean Making it return Result<> simply make the entire frida_fuzzer break, which makes no sense. |
Any chance you can open a PR for that against frida @Mrmaxmeier ? I'd be more than happy to get frida fixed at some point :D |
Yes, wrapping the Helper in a Result probably changed the layout on the stack, which messes up the dangling reference in the callback closure. It still feels a bit like a miracle though that the code has ever worked correctly. 🙃
I've opened frida/frida-rust#103, but the PR is not required to fix the issue on LibAFL's side. |
Windows CI is sad at the moment. I tried investigating and found a gnarly UB issue in the frida fuzzer:
Due to an unsound API in frida-gum (frida/frida-rust#102), this callback references a dangling stack object (
helper
):LibAFL/libafl_frida/src/helper.rs
Line 258 in 37bfead
Unfortunately this is not trivial to fix, as
helper
is returned (and thus moved) later as part of theFridaInstrumentationHelper::new
API.It seems like this was noticed previously (#992), but it is still an issue.
The text was updated successfully, but these errors were encountered: