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

Need to exclude the "shared" libc.so mapping #1124

Merged
merged 1 commit into from
Nov 13, 2024
Merged

Need to exclude the "shared" libc.so mapping #1124

merged 1 commit into from
Nov 13, 2024

Conversation

lx866
Copy link
Contributor

@lx866 lx866 commented Nov 7, 2024

6e3e1cd000-6e3e2c7000 r--s 00000000 07:08 38 /apex/com.android.runtime/lib64/bionic/libc.so
71eb6c2000-71eb6ff000 r--p 00000000 07:08 38 /apex/com.android.runtime/lib64/bionic/libc.so
71eb6ff000-71eb781000 r-xp 0003d000 07:08 38 /apex/com.android.runtime/lib64/bionic/libc.so
71eb781000-71eb786000 r--p 000bf000 07:08 38 /apex/com.android.runtime/lib64/bionic/libc.so
71eb786000-71eb787000 rw-p 000c3000 07:08 38 /apex/com.android.runtime/lib64/bionic/libc.so

the first line mapping of the http://libc.so, it's shared , we can't start from it, we need to start from the second line

So we still do the right thing if the target process' lowest libc.so
range is a shared mapping, for example:

    HNFRI:/ # grep libc.so /proc/22001/maps
    6e3e1cd000-6e3e2c7000 r--s 00000000 07:08 38 /apex/com.android.runtime/lib64/bionic/libc.so
    71eb6c2000-71eb6ff000 r--p 00000000 07:08 38 /apex/com.android.runtime/lib64/bionic/libc.so
    71eb6ff000-71eb781000 r-xp 0003d000 07:08 38 /apex/com.android.runtime/lib64/bionic/libc.so
    71eb781000-71eb786000 r--p 000bf000 07:08 38 /apex/com.android.runtime/lib64/bionic/libc.so
    71eb786000-71eb787000 rw-p 000c3000 07:08 38 /apex/com.android.runtime/lib64/bionic/libc.so

Originally implemented in 5e8314f, but lost in the injector rewrite.
@oleavr oleavr merged commit 20f4df2 into frida:main Nov 13, 2024
17 of 20 checks passed
@oleavr
Copy link
Member

oleavr commented Nov 13, 2024

Thanks! 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants