You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@spamassassin.apache.org on 2019/04/16 11:00:50 UTC

[Bug 7707] New: __STYLE_GIBBERISH_1 causes 100% CPU usage in some messages

https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7707

            Bug ID: 7707
           Summary: __STYLE_GIBBERISH_1  causes 100% CPU usage in some
                    messages
           Product: Spamassassin
           Version: 3.4.2
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: spamc/spamd
          Assignee: dev@spamassassin.apache.org
          Reporter: matthias@zu-con.org
  Target Milestone: Undefined

Created attachment 5650
  --> https://bz.apache.org/SpamAssassin/attachment.cgi?id=5650&action=edit
regex "loop"

Hello,

mails with the attached text cause spamd to stuck with 100%:

This seems to be caused by the following rule:

rawbody        __STYLE_GIBBERISH_1     
/<style(?:\s[^>]{0,40})?>(?:\s{0,100}(?!<\/style>)(?:(?:\/\*(?:\s|[^*<]|\*(?!\/)|<(?!\/style>)){0,200}\*\/)|\#[^{<]{1,50}\{[^}<]{4,100}\})){0,4}+(?:\s{0,100}(?!<\/style>|\/\*)(?:\/{3,}+\*|,{2,}+|;{2,}+|:{2,}+|\|{2,}+|[^\s:;,\|]|[:;,\|\/]{2})){150}/im

The backtrace of the spamd process:

#0  S_regmatch (prog=<optimized out>, startpos=<optimized out>,
reginfo=<optimized out>, my_perl=0x55f8ed3c5800 <PL_regkind>) at regexec.c:8432
#1  S_regtry (my_perl=my_perl@entry=0x55f8ee742010,
reginfo=reginfo@entry=0x7ffc6ddca7e0, startposp=startposp@entry=0x7ffc6ddca7d0)
at regexec.c:3628
#2  0x000055f8ed36633b in Perl_regexec_flags (my_perl=0x55f8ee742010,
rx=0x55f8f2e94f88,
    stringarg=0x55f8f3416ab0
"<style>\n::\n::\n::::\n::::\n::::::\n::::::::\n::::::::::\n", ':' <repeats 12
times>, "\n", ':' <repeats 14 times>, "\n", ':' <repeats 16 times>, "\n", ':'
<repeats 18 times>, "\n", ':' <repeats 20 times>, "\n", ':' <repeats 22 times>,
"\n", ':' <repeats 24 times>, "\n", ':' <repeats 16 times>...,
strend=0x55f8f3416d1a "",
    strbeg=0x55f8f3416ab0
"<style>\n::\n::\n::::\n::::\n::::::\n::::::::\n::::::::::\n", ':' <repeats 12
times>, "\n", ':' <repeats 14 times>, "\n", ':' <repeats 16 times>, "\n", ':'
<repeats 18 times>, "\n", ':' <repeats 20 times>, "\n",
':' <repeats 22 times>, "\n", ':' <repeats 24 times>, "\n", ':' <repeats 16
times>..., minend=<optimized out>, sv=0x55f8f335dc88, data=0x0, flags=97) at
regexec.c:3342
#3  0x000055f8ed2f188c in Perl_pp_match (my_perl=0x55f8ee742010) at
pp_hot.c:1817
#4  0x000055f8ed2edaa6 in Perl_runops_standard (my_perl=0x55f8ee742010) at
run.c:41
#5  0x000055f8ed2737d5 in S_run_body (oldscope=<optimized out>,
my_perl=<optimized out>) at perl.c:2483
#6  perl_run (my_perl=0x55f8ee742010) at perl.c:2411
#7  0x000055f8ed24ca5d in main (argc=<optimized out>, argv=<optimized out>,
env=<optimized out>) at perlmain.c:116

Best regards,
Mattihas

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7707] __STYLE_GIBBERISH_1 causes 100% CPU usage in some messages

Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7707

John Hardin <jh...@impsec.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
                 CC|                            |jhardin@impsec.org
             Status|NEW                         |RESOLVED

--- Comment #2 from John Hardin <jh...@impsec.org> ---
It's better to report issues with specific rules on the users list.

Thanks for the report.

Sending        svn/trunk/rulesrc/sandbox/jhardin/20_misc_testing.cf
Transmitting file data .done
Committing transaction...
Committed revision 1857655.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7707] __STYLE_GIBBERISH_1 causes 100% CPU usage in some messages

Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7707

matthias@zu-con.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |matthias@zu-con.org

--- Comment #1 from matthias@zu-con.org ---
I've tested this with spamassassin from debian jessie and stretch

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7707] __STYLE_GIBBERISH_1 causes 100% CPU usage in some messages

Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7707

--- Comment #3 from John Hardin <jh...@impsec.org> ---
(In reply to John Hardin from comment #2)
> It's better to report issues with specific rules on the users list.

EXCEPT in the case of runaway scan times. Sorry.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7707] __STYLE_GIBBERISH_1 causes 100% CPU usage in some messages

Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7707

matthias@zu-con.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|spamc/spamd                 |spamassassin

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7707] __STYLE_GIBBERISH_1 causes 100% CPU usage in some messages

Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7707

matthias@zu-con.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|spamassassin                |Rules

-- 
You are receiving this mail because:
You are the assignee for the bug.