-
-
Notifications
You must be signed in to change notification settings - Fork 223
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
Crash caused by unsafe read #188
Comments
If that call is invalid then the process itself would crash on execution anyways? Can you please inform me of situations where code like this exists and why we should guard against it? |
For a 32bit process its quite likely someone chooses to use absolute addressing and lazy-map some pages on fault. But either way polyhook already provides a return value on failure and I'd certainly prefer if it did so in such cases. (Here it could keep that call as-is and just copy it without trying to deref its ptr..) |
I wouldn't say that's so common unless your maybe hooking a jit but I see your point. The fix is easy enough, we have safe memory read apis in the library, I'll just switch to those |
resolved with 71553eb |
Here it just blindly dereferences an arbitrary pointer assuming its valid, causing a crash on invalid ptr
PolyHook_2_0/polyhook2/Instruction.hpp
Line 71 in 245a9c0
PolyHook_2_0/polyhook2/Instruction.hpp
Line 73 in 245a9c0
repro:
backtrace:
The text was updated successfully, but these errors were encountered: