8000 linux: Score candidate library mappings in TargetLibraries by esauvisky · Pull Request #1279 · frida/frida-core · GitHub
[go: up one dir, main page]

Skip to content

linux: Score candidate library mappings in TargetLibraries - #1279

Closed
esauvisky wants to merge 1 commit into
frida:mainfrom
esauvisky:mapped-agent-score-library-mappings
Closed

esauvisky wants to merge 1 commit into
frida:mainfrom
esauvisky:mapped-agent-score-library-mappings

Conversation

@esauvisky
Copy link
Copy Markdown

A target process may have a read-only whole-file mmap() of a system library (such as libc.so) at file offset 0 appearing before the real, executable loaded image in /proc/<pid>/maps. Matching the first file_offset == 0 entry in TargetLibraries.find() resolves imports and IFUNC resolvers into the non-executable mapping, causing the mapped agent's constructor to fault with SIGSEGV (SEGV_ACCERR).

Delegate candidate selection to ProcMapsSnapshot.find_module_by_path(), which scores file_offset == 0 candidates by executable segments, and bound copy_from_target() to the selected mapping's instance.

A target process may have a read-only whole-file mmap() of a system
library (e.g. libc.so) at file offset 0 before the real, executable
loaded image in /proc/<pid>/maps. Matching the first file_offset == 0
mapping resolves imports and IFUNC resolvers into the non-executable
file mapping.

Delegate candidate selection to ProcMapsSnapshot.find_module_by_path(),
which scores file_offset == 0 candidates by executable segments, and
bound copy_from_target() to the selected mapping's contiguous instance.
@esauvisky esauvisky closed this Nov 2, 2026
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.

1 participant

0