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.

--
Bill Cole
b...@scconsult.com or billc...@apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)

Reply via email to