-
Notifications
You must be signed in to change notification settings - Fork 124
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
SIGSEGV in artQuickGenericJniTrampoline while hooking java methods #323
Comments
It looks like is is a problem related to the garbage collector, with frida disabling GarbageCollector::Run() prevents the crashes |
Adding that two of my devices (Android 12 and Android 14) have the same issue, both of them have |
In my case,
|
Currently the only working workaround is hooking the onLeave of the RunPhases of the art GC and refresh all the hooks. |
I have tried to test frida-java-bridge but on a Pixel 6 (14.0.0 (AP2A.240605.024, Jun 2024) ) with the latest Google Play system update( open settings->search "Play system"->Google Play system update->check for update) with the latest frida-server and frida-tools(both 16.4.2) on my mac
|
- With Google Play System Updates the base version of libart may differ from the Android version. For example, an Android 12 system could be using libart equivalent to the system version on Android 14. - The function we were hooking in the MarkCompact GC was not the right spot to update the class pointers, causing crashes after some time. Fixes frida#323, for real this time.
- With Google Play System Updates the base version of libart may differ from the Android version. For example, an Android 12 system could be using libart equivalent to the system version on Android 14. - The function we were hooking in the MarkCompact GC was not the right spot to update the class pointers, causing crashes after some time. Fixes #323, for real this time.
Hooking a java method in system_server on a Samsung Android 13 S23 plus and A33 with the last updates causes a SIGSEGV/SEGV_MAPERR crash. On a S21 5G I cannot reproduce it.
My hypothesis is a change in libart.so but looking at the source code and diffing the binaries I couldn't find a reason.
p.s. not all methods seems to trigger the crash
sha1sum: 7c9ef90838717ac4d792139f8b1f7ca9692d018e /apex/com.android.art@
341711000
/lib64/libart.sofrida-gadget 16.2.5
crashlog
reproducer script:
to trigger the crash you can open the Settings app and navigate in the app list.
the crash happens when the jvm tries to access the hooked method
artQuickGenericJniTrampoline:
The text was updated successfully, but these errors were encountered: