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

Add PaX MPROTECT support #101

Open
gvansickle opened this issue Oct 1, 2016 · 0 comments
Open

Add PaX MPROTECT support #101

gvansickle opened this issue Oct 1, 2016 · 0 comments

Comments

@gvansickle
Copy link
Owner

Discovered on #100 :

One other issue: on a PaX MPROTECT system, ucg built this way [i.e. with a JIT-enabled PCRE2] needs to be marked as not MPROTECT safe. On NetBSD this is done by calling 'paxctl +m ucg' after the build is finished. (see http://netbsd.gw.com/cgi-bin/man-cgi?paxctl++NetBSD-current)
On Linux, it's done using 'paxctl -m ucg' (see https://wiki.gentoo.org/wiki/Hardened/PaX_Quickstart#paxctl).
This is a property of the file, so it can be done before installation or after (but take care that the real binary, and not a libtool shell wrapper script, is the target).

It's not clear, but from a cursory reading of the Wikipedia entry here, it seems like the real fix here would need to be done in libpcre(2), via the correct ordering of mprotect() POSIX calls on the mmap()ed area it uses for its executable JIT code.

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

No branches or pull requests

1 participant