Fix incorrect ART class spec offsets#359
Conversation
|
Unrelated to the code changes but just a heads up that I built a gadget based off this PR and still get the same looking crash as #360 This happens on 16.6.6 as well so it's unrelated to Frida 17 changes. There are still unresolved ART issues somewhere. This affected device is unrootable otherwise I would do more digging into it. |
Hello! Since Frida 17.2.0 the shims, such as frida-java-bridge are bundled in your scripts. Did you apply the patch to there as well? Can you give some more details on when the crash happens? |
Nope! I did not. I did indeed manage to get a simple gadget sanity check to run with these changes successfully after also applying it to my script. adb logcat -s "test" |
|
Thanks! 🙌 |
|
There might be a slight problem here that I didn't get around to testing. I don't know if it's better to put it here or as a new issue but I figured you'd see it here. I run a script through an 07-18 08:55:35.593 22684 22684 F DEBUG : Abort message: 'No pending exception expected: java.lang.NoSuchFieldError: no "I" field "value" in class "Ljava/lang/Integer;" or its superclasses Which I think matches https://github.com/frida/frida-java-bridge/pull/359/files#diff-127e99379196fef4dc63a69846f5adbcf81a12eb24557f9b1850b85a9f4f78dfR1026 Full crash log |
|
@ExternalAddress4401 Can you wrap the |
|
The soft reboot is still happening with frida-server-17.2.12 on my Pixel 6 running Android 15 How to replicate:
No errors showing during the execution
logcat: tombstone attached: |
|
@d0td0tslash Hi, the crash you posted has a pending fix in this pull request frida/frida-core#1184. You can see "Failed to reach single-threaded state: wait_time = 4548" in your crash report which has to do with the thread cloaker. |
|
Looking forward to see it implemented in future releases. Thanks again for your work @AeonLucid ! |
|
This PR sometimes causes problems with the error message: Unable to find fields in java/lang/Integer; please file a bug |
Please share a way to reproduce. You may also message me on telegram or discord. |
|
Hey, thank you for your work but sadly it's still crashing frida/frida#3525 |
Do you have a crash log or error messages? |
This is full log, I am not sure what is useful. Device: Pixel 6a |
|
@haris-musa Thanks, Ill have a look shortly. Can you also provide the command / script you are running so I can reproduce on my side? |
I am using this wrapper to start the server Frida Server My phone freezes for a couple of seconds just as I hit "start server". Then the phone restarts Seems a bit random also, in my last 4-5 attempts. It survived once and crashed in other attempts |
|
I have crashes at latest frida, using java bridge.I think it has something to do with this. |
|
@nyakokitsu Can you create a minimal script to reproduce? So that I can look into it and fix it |
@AeonLucid any function implementation hook. Absolutely any, using Java perform. Using oxygenos 15 |
Can I still have a minimal script? Also please tell me which device you are using. |
@AeonLucid i use oneplus nord 4 |
|
@nyakokitsu And is this function of yours called by java or from the native layer (jni)? |
@AeonLucid by java |
This PR requires a new Frida build because it affects the internal system_server agent.
Closes
./frida-server-17.0.5-android-arm64frida-core#1165As you can see this is a widespread issue.
The issue is that the current code only accounts for the ART class layout based on the android sdk.
However,
libart.sois shipped with the google security updates, that way you can have an Android 16 layout on Android 15.This is why
pm uninstall com.google.android.artis a "fix", although temporarily.I fixed this by automatically detecting the offsets for the art class spec. By using a known class
java/lang/Integerwe can search for known fields / methods and find the necessary offsets that way.