https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6655

             Bug #: 6655
           Summary: sa-update might DOS mirrors if TMPDIR unwritable
           Product: Spamassassin
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: sa-update
        AssignedTo: [email protected]
        ReportedBy: [email protected]
    Classification: Unclassified


(mostly a guess)
I am a new mirror for sa-updates, and I see a LOT of hosts hitting the mirror,
over and over, again and again, all for the same files

some every 5 mins, some every 10.

I am GUESSING they have a cronjob */5 sa-update && spamd restart.
(just a guess) and I have confirmed with other mirror ops that the same ip's
are doing the same thing to them.
it COULD BE a proxy with 500 individual sa hosts behind it (but that proxy
should cache), but I suspect it is this failure of logic below:

I HAVE HOWEVER FOUND that a FAILURE TO WRITE TO TMPDIR does NOT STOP sa-update:

related bug 5472 bug 5566 bug 5838
looks like issue is in Util.pm

util: secure_tmpfile failed to create file
'/TMPDIR/.spamassassin58791wnZ9Satmp': No such file or directory
Aug 26 15:31:51.207 [58791] info: error closing
/TMPDIR/.spamassassin58791wnZ9Satmp: Bad file descriptor
util: secure_tmpfile failed to create file
'/TMPDIR/.spamassassin58791v0y53Ftmp': No such file or directory
Aug 26 15:31:51.208 [58791] info: error closing
/TMPDIR/.spamassassin58791v0y53Ftmp: Bad file descriptor
util: secure_tmpfile failed to create file
'/TMPDIR/.spamassassin58791SKL6v6tmp': No such file or directory
Aug 26 15:31:51.208 [58791] info: error closing
/TMPDIR/.spamassassin58791SKL6v6tmp: Bad file descriptor
util: secure_tmpfile failed to create file
'/TMPDIR/.spamassassin5879175RnUhtmp': No such file or directory
Aug 26 15:31:51.208 [58791] info: error closing
/TMPDIR/.spamassassin5879175RnUhtmp: Bad file descriptor
util: secure_tmpfile failed to create file
'/TMPDIR/.spamassassin58791L2bTnUtmp': No such file or directory
Aug 26 15:31:51.208 [58791] info: error closing
/TMPDIR/.spamassassin58791L2bTnUtmp: Bad file descriptor
util: secure_tmpfile failed to create file
'/TMPDIR/.spamassassin58791RuSrU5tmp': No such file or directory
Aug 26 15:31:51.208 [58791] info: error closing
/TMPDIR/.spamassassin58791RuSrU5tmp: Bad file descriptor
util: secure_tmpfile failed to create file
'/TMPDIR/.spamassassin58791zEAv6Qtmp': No such file or directory
Aug 26 15:31:51.208 [58791] info: error closing
/TMPDIR/.spamassassin58791zEAv6Qtmp: Bad file descriptor
util: secure_tmpfile failed to create file
'/TMPDIR/.spamassassin58791BMUsRwtmp': No such file or directory
Aug 26 15:31:51.208 [58791] info: error closing
/TMPDIR/.spamassassin58791BMUsRwtmp: Bad file descriptor
util: secure_tmpfile failed to create file
'/TMPDIR/.spamassassin58791DhFuxWtmp': No such file or directory
Aug 26 15:31:51.209 [58791] info: error closing
/TMPDIR/.spamassassin58791DhFuxWtmp: Bad file descriptor
util: secure_tmpfile failed to create file
'/TMPDIR/.spamassassin58791wuw4rztmp': No such file or directory
Aug 26 15:31:51.209 [58791] info: error closing
/TMPDIR/.spamassassin58791wuw4rztmp: Bad file descriptor
util: secure_tmpfile failed to create file
'/TMPDIR/.spamassassin58791QsVu4xtmp': No such file or directory
Aug 26 15:31:51.209 [58791] info: error closing
/TMPDIR/.spamassassin58791QsVu4xtmp: Bad file descriptor
util: secure_tmpfile failed to create file
'/TMPDIR/.spamassassin58791S7Yvk4tmp': No such file or directory
Aug 26 15:31:51.209 [58791] info: error closing
/TMPDIR/.spamassassin58791S7Yvk4tmp: Bad file descriptor
util: secure_tmpfile failed to create file
'/TMPDIR/.spamassassin58791JeZDtRtmp': No such file or directory
Aug 26 15:31:51.209 [58791] info: error closing
/TMPDIR/.spamassassin58791JeZDtRtmp: Bad file descriptor
util: secure_tmpfile failed to create file
'/TMPDIR/.spamassassin58791Tzk5bbtmp': No such file or directory
Aug 26 15:31:51.209 [58791] info: error closing
/TMPDIR/.spamassassin58791Tzk5bbtmp: Bad file descriptor
util: secure_tmpfile failed to create file
'/TMPDIR/.spamassassin58791wauYnftmp': No such file or directory
Aug 26 15:31:51.210 [58791] info: error closing
/TMPDIR/.spamassassin58791wauYnftmp: Bad file descriptor
util: secure_tmpfile failed to create file
'/TMPDIR/.spamassassin58791Fvcg4Gtmp': No such file or directory
Aug 26 15:31:51.210 [58791] info: error closing
/TMPDIR/.spamassassin58791Fvcg4Gtmp: Bad file descriptor
util: secure_tmpfile failed to create file
'/TMPDIR/.spamassassin58791G5fZkHtmp': No such file or directory
Aug 26 15:31:51.210 [58791] info: error closing
/TMPDIR/.spamassassin58791G5fZkHtmp: Bad file descriptor
util: secure_tmpfile failed to create file
'/TMPDIR/.spamassassin58791AV0HTOtmp': No such file or directory
Aug 26 15:31:51.210 [58791] info: error closing
/TMPDIR/.spamassassin58791AV0HTOtmp: Bad file descriptor
util: secure_tmpfile failed to create file
'/TMPDIR/.spamassassin58791fUZHQ7tmp': No such file or directory
Aug 26 15:31:51.210 [58791] info: error closing
/TMPDIR/.spamassassin58791fUZHQ7tmp: Bad file descriptor
util: secure_tmpfile failed to create file
'/TMPDIR/.spamassassin58791eGiRtGtmp': No such file or directory
Aug 26 15:31:51.210 [58791] info: error closing
/TMPDIR/.spamassassin58791eGiRtGtmp: Bad file descriptor
Aug 26 15:31:51.211 [58791] dbg: channel: attempting channel
updates.spamassassin.org
Aug 26 15:31:51.211 [58791] dbg: channel: update directory
/var/db/spamassassin/3.003002/updates_spamassassin_org
Aug 26 15:31:51.211 [58791] dbg: channel: channel cf file
/var/db/spamassassin/3.003002/updates_spamassassin_org.cf
Aug 26 15:31:51.211 [58791] dbg: channel: channel pre file
/var/db/spamassassin/3.003002/updates_spamassassin_org.pre
Aug 26 15:31:51.211 [58791] dbg: channel: metadata version = 1161446
Aug 26 15:31:51.215 [58791] dbg: dns: 2.3.3.updates.spamassassin.org =>
1161446, parsed as 1161446
Aug 26 15:31:51.216 [58791] dbg: channel: current version is 1161446, new
version is 1161446, skipping channel
Aug 26 15:31:51.216 [58791] dbg: diag: updates complete, exiting with code 1

my suggestion, is to EXIT sa-update with rc=1 if it cannot write to TMPDIR, or,
if TMPDIR fills up during http_get() or tarball unpack.

I will work on a patch.

-- 
Configure bugmail: 
https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to