On Wed, 29 May 2019, Bill Cole wrote:

On 28 May 2019, at 4:31, Stoiko Ivanov wrote:

Hello,

with a recent update to the ruleset, we're encountering certain mails,
which cause the rule-evaluation to use 100% cpu.

The effect was reproduced with Proxmox Mailgateway 5.2 (running
Spamassassin 3.4.2 ) and Ubuntu 19.04 (also running Spamassassin 3.4.2)

I have reproduced this on CentOS 7 with the stock Perl 5.16 and manually installed 5.18 and 5.28 builds. SA hangs while evaluating the rule and eventually times out.

On stock fully-updated CentOS 6 the hang is worse: apparently perl gets stuck inside a syscall and it ignores the alarm signal for the timeout, hanging the process indefinitely.

Further muddying the issue, on Mac OS X 10.6.8 with Perl 5.26 (MacPorts local build) the hang simply does not happen.

After some debugging the issue was narrowed down to the rule
__STYLE_GIBBERISH_1 .

Confirmed: switching to the simpler version of that rule which is used for older versions of Perl eliminates the hang. I suspect that the ultimate fix may be to just back off to the version of the rule that is already used for older Perl.

I have to admit that I don't entirely understand the complex version that is causing the hang. However, I have experimented with limiting some of the ranges in it with no success.

I was able to beat it into submission. The corrected version should go out in tonight's update, masscheck willing...


--
 John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
 jhar...@impsec.org    FALaholic #11174     pgpk -a jhar...@impsec.org
 key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
  We have to realize that people who run the government can and do
  change. Our society and laws must assume that bad people -
  criminals even - will run the government, at least part of the
  time.                                               -- John Gilmore
-----------------------------------------------------------------------
 8 days until the 75th anniversary of D-Day

Reply via email to