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

Android running error: Could not apply memory protection #83

Open
migraine-sudo opened this issue Aug 9, 2024 · 1 comment
Open

Android running error: Could not apply memory protection #83

migraine-sudo opened this issue Aug 9, 2024 · 1 comment

Comments

@migraine-sudo
Copy link

I run it with root permissions on my Xiaomi phone, but I get this error. Selinux is also closed. The program is just a simple loop hello world. Is there any solution?

./litecov  -instrument_module fuzz  -trace_basic_blocks -patch_return_addresses -- test


[-] PROGRAM ABORT : Could not apply memory protection         
Location : ExtractCodeRanges(), /.../TinyInst/Linux/debugger.cpp:1517
@ifratric
Copy link
Collaborator

Sorry about the late reply.

Unfortunately I don't have the same phone, but today I tested TinyInst on Linux again with two different phones (from Google and Samsung) and didn't encounter this issue.

From the error message it seems the target is unable to change memory permissions of executable memory (When instrumenting a module, TinyInst will mark all previously executable memory inside the module as non-executable. This is so TinyInst can catch attempts to execute code from the instrumented module and redirect execution to instrumented code region instead. The error occurs during mprotect in the context of the target program). I don't know if this is something related to selinux or some custom mitigation on Xiaomi phones.

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

No branches or pull requests

2 participants