Skip to content
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

bHook在部分系统上面会报“替换 GOT 值之前,通过 dladdr() 验证函数地址失败。”错误码19 #95

Open
yuanwofei opened this issue Mar 25, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@yuanwofei
Copy link

bytehook Version

1.0.10

Android OS Version

Android 14

Android ABIs

arm64-v8a

Device Manufacturers and Models

小米 13 Android 14和Pixel 3XL Android 12

Describe the Bug

bHook在部分系统上面会报“替换 GOT 值之前,通过 dladdr() 验证函数地址失败。” 错误码19,屏蔽下面这块代码
image
能绕过这个报错。

另外屏蔽这块代码之后,后续的hook是成功的,看起来不需要verify the GOT value这个步骤也是可以的。不清楚是不是verify the GOT value这块代码在部分系统上面有兼容问题?

@yuanwofei yuanwofei added the bug Something isn't working label Mar 25, 2024
@caikelun
Copy link
Member

这个机制是为了防止“在bytehook hook之前,这个GOT项中的地址值已经被其他PLT hook逻辑修改了”,如果遇到这种情况,bytehook再去修改一次是可以的,但是一个进程中存在多个plt hook逻辑是不太合理的,所以目前是返回errno,需要使用者排查一下,比如可以在bytehook hook之前,先打印一下这个GOT位置的地址值,看看是不是符合预期,还是被hook了。

@yuanwofei
Copy link
Author

可能是,我同时使用了xHook和bHook,我屏蔽其中一个看看

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants