Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 3 product line. The current stable release is 3.9. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 129337

Summary: CAN-2004-0796 DOS attack open to certain malformed messages
Product: Red Hat Enterprise Linux 3 Reporter: Josh Bressers <bressers>
Component: spamassassinAssignee: Warren Togami <wtogami>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: pekkas, redhat-bugzilla, tao
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-04-20 00:08:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
RHEL3 spamassassin patch
none
Compressed POC message none

Description Josh Bressers 2004-08-06 16:55:30 UTC
Release of new Upstream-Version 2.64

Summary of major changes since 2.63
- -----------------------------------
  - Security fix prevents a denial of service attack open to certain
    malformed messages; this DoS affects all SpamAssassin 2.5x
    and 2.6x versions to date.
  - Backported several very reliable rules from the SpamAssassin 3.0.0
    codebase.

FC[12] are handled by bug 129284

RHEL2.1 does not contain spamassassin, therefore is not affected.

Comment 1 Josh Bressers 2004-08-19 21:56:25 UTC
OK, I have found the upstream fix for this DOS.  Here's the output of
my demo file

Fixed
cat 999  0.00s user 0.01s system 1% cpu 0.766 total
spamassassin  8.48s user 0.60s system 37% cpu 24.460 total

Not Fixed
cat 999  0.00s user 0.02s system 2% cpu 0.939 total
spamassassin  150.75s user 1.37s system 95% cpu 2:38.95 total

I'll attach the patch against the 3.0E src.rpm along with the demo file.


Comment 2 Josh Bressers 2004-08-19 22:00:10 UTC
Created attachment 102901 [details]
RHEL3 spamassassin patch

Comment 3 Josh Bressers 2004-08-19 22:03:29 UTC
Created attachment 102902 [details]
Compressed POC message

This message is 5 megs when uncompressed, so I opted to gzip it for sanity's
sake.

Comment 4 Josh Bressers 2004-08-25 13:40:00 UTC
This is going to be RHSA-2004:451

Comment 6 Josh Bressers 2004-09-30 14:23:50 UTC
An errata has been issued which should help the problem 
described in this bug report. This report is therefore being 
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, 
please follow the link below. You may reopen this bug report 
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2004-451.html


Comment 7 Pekka Savola 2004-12-19 18:06:20 UTC
It seems the patch may be incomplete.  It seems to be missing a change
to lib/Mail/SpamAssassin/Bayes.pm - tokenize_headers() was also
patched in 2.64 (vs the diff to 2.63).

I fear here may lurk a slightly different attack vector, but I have
not analyzed this in detail.

See comment #2 at https://bugzilla.fedora.us/show_bug.cgi?id=2268 for
more.