Git Product home page Git Product logo

and64inlinehook's Issues

Cause: execute-only (no-read) memory access error; likely due to data in .text.

on android10.0 targetSdkVersion 29 arm64-v8a
#1 pc 0000000000004880 /data/app/WXW.Hook-LkVDwH8X8qf3LeKNEPrzHg==/lib/arm64/libarm_64.so (A64HookFunctionV+100) (BuildId: 971089d04383d33201a35816448148fd814565f1)
#2 pc 00000000000051d8 /data/app/WXW.Hook-LkVDwH8X8qf3LeKNEPrzHg==/lib/arm64/libarm_64.so (A64HookFunction+80) (BuildId: 971089d04383d33201a35816448148fd814565f1)

hook函数的指令跳转到被替换指令的位置有什么通用解决方案吗

你好,目前遇到这个问题,在回调原始指令后,由于跳转到了已经被替换为跳转指令的代码位置,导致未定义指令crash,请问有什么好的解决方案吗

0x0000aaaac188073c <+0>: stp x29, x30, [sp, #-16]!
0x0000aaaac1880740 <+4>: ldr x17, 0xaaaac1880748
0x0000aaaac1880744 <+8>: blr x17
0x0000aaaac1880748 <+12>: sbfiz x20, x2, #39, #8
=> 0x0000aaaac188074c <+16>: .inst 0x0000ffff ; undefined //undefined inst,crash
0x0000aaaac1880750 <+20>: b 0xaaaac1880788
......
0x0000aaaac1880794 <+88>: b.le 0xaaaac1880754
0x0000aaaac1880798 <+92>: ldr w0, [sp, #4]
0x0000aaaac188079c <+96>: add w0, w0, #0x1
0x0000aaaac18807a0 <+100>: str w0, [sp, #4]
0x0000aaaac18807a4 <+104>: ldr w0, [sp, #4]
0x0000aaaac18807a8 <+108>: cmp w0, #0xf
0x0000aaaac18807ac <+112>: b.le 0xaaaac188074c //这里要跳转回已经被替换指令的位置

使用MSHookFunction hook一个get_text函数,arm32正常,arm64 奔溃

F libc : Pointer tag for 0x7166ac9660 was truncated.
E CRASH : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
E CRASH : Version '2021.3.18f1 (3129e69bc0c7)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
E CRASH : Build fingerprint: 'Lenovo/TB-9707F_PRC/TB-9707F:11/RKQ1.210303.002/13.1.541_220421:user/release-keys'
E CRASH : Revision: '0'
E CRASH : ABI: 'arm64'
E CRASH : Timestamp: 2023-05-29 23:20:57+0800
E CRASH : pid: 17787, tid: 17830, name: UnityMain >>> com.dynamicgames.worldtruckdrivingsimulator.zh <<<
E CRASH : uid: 10397
E CRASH : signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
E CRASH : x0 0000000000000000 x1 00000000000045a6 x2 0000000000000006 x3 0000007270279e00
E CRASH : x4 0000000000000000 x5 0000000000000000 x6 0000000000000000 x7 0000000000000020
E CRASH : x8 00000000000000f0 x9 ac9a84abbd467725 x10 0000000000000000 x11 ffffffc0fffffbdf
E CRASH : x12 0000000000000001 x13 000008f615434407 x14 000dccc56dce3c44 x15 0000000034155555
E CRASH : x16 00000075dacfdc80 x17 00000075dacdfbb0 x18 00000071e1186b18 x19 000000000000457b
E CRASH : x20 00000000000045a6 x21 00000000ffffffff x22 000000725fc98c60 x23 000000725fcd4280
E CRASH : x24 000000725fccec70 x25 000000725fcd2aa8 x26 000000725fce1d38 x27 000000725fccb618
E CRASH : x28 0000000000000043 x29 0000007270279e80
E CRASH : sp 0000007270279de0 lr 00000075dac933e0 pc 00000075dac9340c
E CRASH : backtrace:
E CRASH : #00 pc 000000000004e40c /apex/com.android.runtime/lib64/bionic/libc.so (abort+164) (BuildId: 4b0a60ca3b69d2d66dca24bb01c8d1aa)
E CRASH : #1 pc 000000000003bb1c /apex/com.android.runtime/lib64/bionic/libc.so (mallinfo) (BuildId: 4b0a60ca3b69d2d66dca24bb01c8d1aa)
E CRASH : #2 pc 0000000000b29890 /data/app/~~QTRsI35I4xNycUAC02pwCQ==/com.dynamicgames.worldtruckdrivingsimulator.zh-cQZz0ASEwkO_ivB7RQ_pGA==/lib/arm64/libil2cpp.so (BuildId: d94909590ee8ec2d9e88eab761a3941035d54a67)
E CRASH : #3 pc 0000000000804f74 /data/app/~~QTRsI35I4xNycUAC02pwCQ==/com.dynamicgames.worldtruckdrivingsimulator.zh-cQZz0ASEwkO_ivB7RQ_pGA==/lib/arm64/libil2cpp.so (BuildId: d94909590ee8ec2d9e88eab761a3941035d54a67)
E CRASH : #4 pc 0000000000804de8 /data/app/~~QTRsI35I4xNycUAC02pwCQ==/com.dynamicgames.worldtruckdrivingsimulator.zh-cQZz0ASEwkO_ivB7RQ_pGA==/lib/arm64/libil2cpp.so (BuildId: d94909590ee8ec2d9e88eab761a3941035d54a67)
E CRASH : #5 pc 00000000002f2528 /data/app/~~QTRsI35I4xNycUAC02pwCQ==/com.dynamicgames.worldtruckdrivingsimulator.zh-cQZz0ASEwkO_ivB7RQ_pGA==/lib/arm64/libunity.so (BuildId: 01bdcdb9cb0e19a01b0cfcc4a55b66822bfdc830)
E CRASH : #6 pc 00000000003000a8 /data/app/~~QTRsI35I4xNycUAC02pwCQ==/com.dynamicgames.worldtruckdrivingsimulator.zh-cQZz0ASEwkO_ivB7RQ_pGA==/lib/arm64/libunity.so (BuildId: 01bdcdb9cb0e19a01b0cfcc4a55b66822bfdc830)
E CRASH : #7 pc 000000000030edf0 /data/app/~~QTRsI35I4xNycUAC02pwCQ==/com.dynamicgames.worldtruckdrivingsimulator.zh-cQZz0ASEwkO_ivB7RQ_pGA==/lib/arm64/libunity.so (BuildId: 01bdcdb9cb0e19a01b0cfcc4a55b66822bfdc830)
E CRASH : #8 pc 000000000030f02c /data/app/~~QTRsI35I4xNycUAC02pwCQ==/com.dynamicgames.worldtruckdrivingsimulator.zh-cQZz0ASEwkO_ivB7RQ_pGA==/lib/arm64/libunity.so (BuildId: 01bdcdb9cb0e19a01b0cfcc4a55b66822bfdc830)
E CRASH : #9 pc 000000000030f868 /data/app/~~QTRsI35I4xNycUAC02pwCQ==/com.dynamicgames.worldtruckdrivingsimulator.zh-cQZz0ASEwkO_ivB7RQ_pGA==/lib/arm64/libunity.so (BuildId: 01bdcdb9cb0e19a01b0cfcc4a55b66822bfdc830)
E CRASH : #10 pc 000000000018245c /data/app/~~QTRsI35I4xNycUAC02pwCQ==/com.dynamicgames.worldtruckdrivingsimulator.zh-cQZz0ASEwkO_ivB7RQ_pGA==/lib/arm64/libunity.so (BuildId: 01bdcdb9cb0e19a01b0cfcc4a55b66822bfdc830)
E CRASH : #11 pc 0000000000226e80 /data/app/~~QTRsI35I4xNycUAC02pwCQ==/com.dynamicgames.worldtruckdrivingsimulator.zh-cQZz0ASEwkO_ivB7RQ_pGA==/lib/arm64/libunity.so (BuildId: 01bdcdb9cb0e19a01b0cfcc4a55b66822bfdc830)
E CRASH : #12 pc 0000000000226ec0 /data/app/~~QTRsI35I4xNycUAC02pwCQ==/com.dynamicgames.worldtruckdrivingsimulator.zh-cQZz0ASEwkO_ivB7RQ_pGA==/lib/arm64/libunity.so (BuildId: 01bdcdb9cb0e19a01b0cfcc4a55b66822bfdc830)
E CRASH : #13 pc 00000000002270f8 /data/app/~~QTRsI35I4xNycUAC02pwCQ==/com.dynamicgames.worldtruckdrivingsimulator.zh-cQZz0ASEwkO_ivB7RQ_pGA==/lib/arm64/libunity.so (BuildId: 01bdcdb9cb0e19a01b0cfcc4a55b66822bfdc830)
E CRASH : #14 pc 000000000037bf20 /data/app/~~QTRsI35I4xNycUAC02pwCQ==/com.dynamicgames.worldtruckdrivingsimulator.zh-cQZz0ASEwkO_ivB7RQ_pGA==/lib/arm64/libunity.so (BuildId: 01bdcdb9cb0e19a01b0cfcc4a55b66822bfdc830)
E CRASH : #15 pc 0000000000392728 /data/app/~~QTRsI35I4xNycUAC02pwCQ==/com.dynamicgames.worldtruckdrivingsimulator.zh-cQZz0ASEwkO_ivB7RQ_pGA==/lib/arm64/libunity.so (BuildId: 01bdcdb9cb0e19a01b0cfcc4a55b66822bfdc830)
E CRASH : #16 pc 0000000000046d2c /data/app/~~QTRsI35I4xNycUAC02pwCQ==/com.dynamicgames.worldtruckdrivingsimulator.zh-cQZz0ASEwkO_ivB7RQ_pGA==/oat/arm64/base.odex
W ingsimulator.z: <0x06f49c2e> for 7.163s Unlock long monitor contention with owner firebase-installations-executor-2 (17826) waiters=0
E SELinux : avc: denied { find } for pid=28498 uid=10114 name=tethering scontext=u:r:permissioncontroller_app:s0:c114,c256,c512,c768 tcontext=u:object_r:tethering_service:s0 tclass=service_manager permissive=0
E SELinux : avc: denied { find } for pid=3333 uid=10193 name=tethering scontext=u:r:vendor_systemhelper_app:s0:c512,c768 tcontext=u:object_r:tethering_service:s0 tclass=service_manager permissive=0
E CRASH : Tombstone written to: /storage/emulated/0/Android/data/com.dynamicgames.worldtruckdrivingsimulator.zh/files/tombstone_00
E AndroidRuntime: FATAL EXCEPTION: UnityMain
E AndroidRuntime: Process: com.dynamicgames.worldtruckdrivingsimulator.zh, PID: 17787
E AndroidRuntime: java.lang.Error: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
E AndroidRuntime: Version '2021.3.18f1 (3129e69bc0c7)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
E AndroidRuntime: Build fingerprint: 'Lenovo/TB-9707F_PRC/TB-9707F:11/RKQ1.210303.002/13.1.541_220421:user/release-keys'
E AndroidRuntime: Revision: '0'
E AndroidRuntime: ABI: 'arm64'
E AndroidRuntime: Timestamp: 2023-05-29 23:20:57+0800
E AndroidRuntime: pid: 17787, tid: 17830, name: UnityMain >>> com.dynamicgames.worldtruckdrivingsimulator.zh <<<
E AndroidRuntime: uid: 10397
E AndroidRuntime: signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
E AndroidRuntime: x0 0000000000000000 x1 00000000000045a6 x2 0000000000000006 x3 0000007270279e00
E AndroidRuntime: x4 0000000000000000 x5 0000000000000000 x6 0000000000000000 x7 0000000000000020
E AndroidRuntime: x8 00000000000000f0 x9 ac9a84abbd467725 x10 0000000000000000 x11 ffffffc0fffffbdf
E AndroidRuntime: x12 0000000000000001 x13 000008f615434407 x14 000dccc56dce3c44 x15 0000000034155555
E AndroidRuntime: x16 00000075dacfdc80 x17 00000075dacdfbb0 x18 00000071e1186b18 x19 000000000000457b
E AndroidRuntime: x20 00000000000045a6 x21 00000000ffffffff x22 000000725fc98c60 x23 000000725fcd4280
E AndroidRuntime: x24 000000725fccec70 x25 000000725fcd2aa8 x26 000000725fce1d38 x27 000000725fccb618
E AndroidRuntime: x28 0000000000000043 x29 0000007270279e80
E AndroidRuntime: sp 0000007270279de0 lr 00000075dac933e0 pc 00000075dac9340c
E AndroidRuntime:
E AndroidRuntime: backtrace:
E AndroidRuntime: #00 pc 000000000004e40c /apex/com.android.runtime/lib64/bionic/libc.so (abort+164) (BuildId: 4b0a60ca3b69d2d66dca24bb01c8d1aa)
E AndroidRuntime: #1 pc 000000000003bb1c /apex/com.android.runtime/lib64/bionic/libc.so (mallinfo) (BuildId: 4b0a60ca3b69d2d66dca24bb01c8d1aa)
E AndroidRuntime: #2 pc 0000000000b29890 /data/app/~~QTRsI35I4xNycUAC02pwCQ==/com.dynamicgames.worldtruckdrivingsimulator.zh-cQZz0ASEwkO_ivB7RQ_pGA==/lib/arm64/libil2cpp.so (BuildId: d94909590ee8ec2d9e88eab761a3941035d54a67)
E AndroidRuntime: #3 pc 0000000000804f74 /data/app/~~QTRsI35I4xNycUAC02pwCQ==/com.dynamicgames.worldtruckdrivingsimulator.zh-cQZz0ASEwkO_ivB7RQ_pGA==/lib/arm64/libil2cpp.so (BuildId: d94909590ee8ec2d9e88eab761a3941035d54a67)
E AndroidRuntime: #4 pc 0000000000804de8 /data/app/~~QTRsI35I4xNycUAC02pwCQ==/com.dynamicgames.worldtruckdrivingsimulator.zh-cQZz0ASEwkO_ivB7RQ_pGA==/lib/arm64/libil2cpp.so (BuildId: d94909590ee8ec2d9e88eab761a3941035d54a67)
E AndroidRuntime: #5 pc 00000000002f2528 /data/app/~~QTRsI35I4xNycUAC02pwCQ==/com.dynamicgames.worldtruckdrivingsimulator.zh-cQZz0ASEwkO_ivB7RQ_pGA==/lib/arm64/libunity.so (BuildId: 01bdcdb9cb0e19a01b0cfcc4a55b66822bfdc830)
E AndroidRuntime: #6 pc 00000000003000a8 /data/app/~~QTRsI35I4xNycUAC02pwCQ==/com.dynamicgames.worldtruckdrivingsimulator.zh-cQZz0ASEwkO_ivB7RQ_pGA==/lib/arm64/libunity.so (BuildId: 01bdcdb9cb0e19a01b0cfcc4a55b66822bfdc830)
E AndroidRuntime: #7 pc 000000000030edf0 /data/app/~~QTRsI35I4xNycUAC02pwCQ==/com.dynamicgames.worldtruckdrivingsimulator.zh-cQZz0ASEwkO_ivB7RQ_pGA==/lib/arm64/libunity.so (BuildId: 01bdcdb9cb0e19a01b0cfcc4a55b66822bfdc830)
E AndroidRuntime: #8 pc 000000000030f02c /data/app/~~QTRsI35I4xNycUAC02pwCQ==/com.dynamicgames.worldtruckdrivingsimulator.zh-cQZz0ASEwkO_ivB7RQ_pGA==/lib/arm64/libunity.so (BuildId: 01bdcdb9cb0e19a01b0cfcc4a55b66822bfdc830)
E AndroidRuntime: #9 pc 000000000030f868 /data/app/~~QTRsI35I4xNycUAC02pwCQ==/com.dynamicgames.worldtruckdrivingsimulator.zh-cQZz0ASEwkO_ivB7RQ_pGA==/lib/arm64/libunity.so (BuildId: 01bdcdb9cb0e19a01b0cfcc4a55b66822bfdc830)
E AndroidRuntime: #10 pc 000000000018245c /data/app/~~QTRsI35I4xNycUAC02pwCQ==/com.dynamicgames.worldtruckdrivingsimulator.zh-cQZz0ASEwkO_ivB7RQ_pGA==/lib/arm64/libunity.so (BuildId: 01bdcdb9cb0e19a01b0cfcc4a55b66822bfdc830)
E AndroidRuntime: #11 pc 0000000000226e80 /data/app/~~QTRsI35I4xNycUAC02pwCQ==/com.dynamicgames.worldtruckdrivingsimulator.zh-cQZz0ASEwkO_ivB7RQ_pGA==/lib/arm64/libunity.so (BuildId: 01bdcdb9cb0e19a01b0cfcc4a55b66822bfdc830)
E AndroidRuntime: #12 pc 0000000000226ec0 /data/app/~~QTRsI35I4xNycUAC02pwCQ==/com.dynamicgames.worldtruckdrivingsimulator.zh-cQZz0ASEwkO_ivB7RQ_pGA==/lib/arm64/libunity.so (BuildId: 01bdcdb9cb0e19a01b0cfcc4a55b66822bfdc830)
E AndroidRuntime: #13 pc 00000000002270f8 /data/app/~~QTRsI35I4xNycUAC02pwCQ==/com.dynamicgames.worldtruckdrivingsimulator.zh-cQZz0ASEwkO_ivB7RQ_pGA==/lib/arm64/libunity.so (BuildId: 01bdcdb9cb0e19a01b0cfcc4a55b66822bfdc830)
E AndroidRuntime: #14 pc 000000000037bf20 /data/app/~~QTRsI35I4xNycUAC02pwCQ==/com.dynamicgames.worldtruckdrivingsimulator.zh-cQZz0ASEwkO_ivB7RQ_pGA==/lib/arm64/libunity.so (BuildId: 01bdcdb9cb0e19a01b0cfcc4a55b66822bfdc830)
E AndroidRuntime: #15 pc 0000000000392728 /data/app/~~QTRsI35I4xNycUAC02pwCQ==/com.dynamicgames.worldtruckdrivingsimulator.zh-cQZz0ASEwkO_ivB7RQ_pGA==/lib/arm64/libunity.so (BuildId: 01bdcdb9cb0e19a01b0cfcc4a55b66822bfdc830)
E AndroidRuntime: #16 pc 0000000000046d2c /data/app/~~QTRsI35I4xNycUAC02pwCQ==/com.dynamicgames.worldtruckdrivingsimulator.zh-cQZz0ASEwkO_ivB7RQ_pGA==/oat/arm64/base.odex
E AndroidRuntime:
E AndroidRuntime: at libc.abort(abort:164)
E AndroidRuntime: at libc.mallinfo(mallinfo:0)
E AndroidRuntime: at libil2cpp.0xb29890(Native Method)
E AndroidRuntime: at libil2cpp.0x804f74(Native Method)
E AndroidRuntime: at libil2cpp.0x804de8(Native Method)
E AndroidRuntime: at libunity.0x2f2528(Native Method)
E AndroidRuntime: at libunity.0x3000a8(Native Method)
E AndroidRuntime: at libunity.0x30edf0(Native Method)
E AndroidRuntime: at libunity.0x30f02c(Native Method)
E AndroidRuntime: at libunity.0x30f868(Native Method)
E AndroidRuntime: at libunity.0x18245c(Native Method)
E AndroidRuntime: at libunity.0x226e80(Native Method)
E AndroidRuntime: at libunity.0x226ec0(Native Method)
E AndroidRuntime: at libunity.0x2270f8(Native Method)
E AndroidRuntime: at libunity.0x37bf20(Native Method)
E AndroidRuntime: at libunity.0x392728(Native Method)
E AndroidRuntime: at base.0x46d2c(Native Method)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.