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

            Bug ID: 8593
           Summary: spamc -z with a user name of about 8,150 bytes writes
                    past the end of its request header buffer
           Product: Spamassassin
           Version: 4.0.2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: spamc/spamd
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: Undefined

Created attachment 6315
  --> https://bz.apache.org/SpamAssassin/attachment.cgi?id=6315&action=edit
patch to stop libspamc building a request header past its buffer

This is hardening of spamc, not a fix for a vulnerability. spamc sends spamd
the user it runs as, or the name given with -u by a caller such as an MTA.
There is no known exploit. Even so, no user name should make spamc write past a
buffer.

spamc -z with a user name of 8,146 to 8,160 bytes writes the end of its request
header past the buffer that holds it. When spamc is built with _FORTIFY_SOURCE
or AddressSanitizer, it stops with an error. The cause is a computation (bufsiz
- len) that wraps around as a size_t.

The attached patch adds a test of len against bufsiz. Every user name that
spamc accepts today is accepted as before.

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

Reply via email to