https://redmine.pfsense.org/https://redmine.pfsense.org/favicon.ico?16780521162021-06-07T08:09:44ZpfSense bugtrackerpfSense Plus - Todo #12004: Disable PCRE JIT to work around PHP PCRE crashes on multi-core 32-bit ARM systemshttps://redmine.pfsense.org/issues/12004?journal_id=543572021-06-07T08:09:44ZJim Pingle
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/54357/diff?detail_id=44604">diff</a>)</li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul> pfSense Plus - Todo #12004: Disable PCRE JIT to work around PHP PCRE crashes on multi-core 32-bit ARM systemshttps://redmine.pfsense.org/issues/12004?journal_id=543592021-06-07T08:11:14ZJim Pingle
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/11466">Bug #11466</a>: PHP exits with signal 11 on SG-3100 when calling PCRE functions</i> added</li></ul> pfSense Plus - Todo #12004: Disable PCRE JIT to work around PHP PCRE crashes on multi-core 32-bit ARM systemshttps://redmine.pfsense.org/issues/12004?journal_id=543612021-06-07T08:14:37ZJim Pingle
<ul></ul><p>Packages and other scripts could use <code>ini_set("pcre.jit", "0");</code> to disable PCRE JIT on systems without the patch to avoid the problem on unpatched systems until the next update.</p> pfSense Plus - Todo #12004: Disable PCRE JIT to work around PHP PCRE crashes on multi-core 32-bit ARM systemshttps://redmine.pfsense.org/issues/12004?journal_id=543642021-06-07T08:18:45ZJim Pingle
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/54364/diff?detail_id=44608">diff</a>)</li></ul> pfSense Plus - Todo #12004: Disable PCRE JIT to work around PHP PCRE crashes on multi-core 32-bit ARM systemshttps://redmine.pfsense.org/issues/12004?journal_id=547812021-06-28T13:34:17ZJim Pingle
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/54781/diff?detail_id=45021">diff</a>)</li></ul> pfSense Plus - Todo #12004: Disable PCRE JIT to work around PHP PCRE crashes on multi-core 32-bit ARM systemshttps://redmine.pfsense.org/issues/12004?journal_id=552012021-07-22T12:16:00ZSteve Wheeler
<ul></ul><p>Testing against the current 21.09 snapshot the disable-pcrejit patch is no longer required.<br /><pre>
21.09-DEVELOPMENT (arm)
built on Thu Jul 22 01:10:26 EDT 2021
FreeBSD 12.2-STABLE
</pre></p>
<p>That patch is in that snapshot but after reverting it the following test code returns successfully.</p>
<pre>
$rule1 = 'alert ( msg:"DECODE_NOT_IPV4_DGRAM"; sid:1; gid:116; rev:1; metadata:rule-type decode; classtype:protocol-command-decode;)';
$matches = array();
if (preg_match('/\bmsg\s*:\s*"(.+?)"\s*;/i', $rule1, $matches))
$msg = trim($matches[1]);
if (preg_match('/\bsid\s*:\s*(\d+)\s*;/i', $rule1, $matches))
$sid = trim($matches[1]);
if (preg_match('/\bgid\s*:\s*(\d+)\s*;/i', $rule1, $matches))
$gid = trim($matches[1]);
if (preg_match('/\brev\s*:\s*([^\;]+)/i', $rule1, $matches))
$rev = trim($matches[1]);
if (preg_match('/\bclasstype\s*:\s*([^\;]+)/i', $rule1, $matches))
$classtype = trim($matches[1]);
print $msg . "\n";
print $sid . "\n";
print $gid . "\n";
print $rev . "\n";
print $classtype . "\n";
</pre>
<p>That code coredumps PHP in 21.05 without the patch.</p> pfSense Plus - Todo #12004: Disable PCRE JIT to work around PHP PCRE crashes on multi-core 32-bit ARM systemshttps://redmine.pfsense.org/issues/12004?journal_id=552022021-07-22T12:24:17ZJim Pingle
<ul></ul><p>I reverted the relevant commits since this is no longer necessary.</p> pfSense Plus - Todo #12004: Disable PCRE JIT to work around PHP PCRE crashes on multi-core 32-bit ARM systemshttps://redmine.pfsense.org/issues/12004?journal_id=553802021-08-02T15:16:54ZJim Pingle
<ul><li><strong>Target version</strong> changed from <i>64</i> to <i>21.05.1</i></li></ul>