[pcre-dev] [Bug 1749] PCRE-JITted code should be executed fr…

Etusivu
Poista viesti
Lähettäjä: admin
Päiväys:  
Vastaanottaja: pcre-dev
Vanhat otsikot: [pcre-dev] [Bug 1749] New: PCRE-JITted code should be executed from non-writable memory to obey execmem SELinux restriction
Aihe: [pcre-dev] [Bug 1749] PCRE-JITted code should be executed from non-writable memory to obey execmem SELinux restriction
https://bugs.exim.org/show_bug.cgi?id=1749

--- Comment #25 from Petr Pisar <ppisar@???> ---
Created attachment 961
--> https://bugs.exim.org/attachment.cgi?id=961&action=edit
Attempt to propagate mprotect() failure

Attached patch tries to handle failed mprotect() call so that an application
receives PCRE2_ERROR_JIT_BADOPTION on pcre2_jit_compile().

It works besides failing some tests like testinput17 because pcre2test calls
pcre2_jit_match() unconditionally for /fastjit patterns. Also RunGrepTest and
pcre2_jit_test seems unhappy with failing pcre2_jit_compile().

I think this is the best approach because it's already documented that
pcre2_jit_compile() can fail so applications should be written that way and we
could have transparent fall-back into non-JIT matching if JIT techniques are
disallowed by the operating system.

--
You are receiving this mail because:
You are on the CC list for the bug.