Posts

Post marked as solved
4 Replies
1.4k Views
Now we want to use the system call of `mprotect` to access and execute any function in dynamic way. It is really usage in hot patching running process. Normaly, we use ` mprotect` with flags like `PROT_WRITE` or `PROT_READ` and it should work in Linux and MacOS(before Catalina). Recently we found that `mprotect` with `PROT_WRITE` will fail and return zero even throught we have grant the priviledges to the process. It may be the security issue so we disable the csrutil and codesign with almost all the entitlements before testing but it still fail. Here are the related discussion: https://github.com/flutter/flutter/issues/36714https://github.com/agiledragon/gomonkey/issues/10https://stackoverflow.com/questions/60654834/using-mprotect-to-make-text-segment-writable-on-macoshttps://github.com/flutter/flutter/issues/36714
Posted
by tobe43.
Last updated
.