mailscanner died unexpectedly because of eval in taint mode

Bug #689411 reported by Oliver Siegmar
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
mailscanner (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: mailscanner

After upgrading from jaunty to lucid my mailscanner dies when constructing a warning message.

When launching mailscanner with debug enabled, I get this:

In Debugging mode, not forking...
Trying to setlogsock(unix)
Building a message batch to scan...
Have a batch of 1 message.
Insecure dependency in eval while running with -T switch at /usr/share/MailScanner//MailScanner/Message.pm line 4239, <GEN63> line 1.
Insecure dependency in eval while running with -T switch at /usr/share/MailScanner//MailScanner/Message.pm line 4239, <GEN63> line 1.

It is the ConstructWarning sub in /usr/share/MailScanner/MailScanner/Message.pm - line 4239 is:

$result = eval "\"$line\"";

As soon as a new infected mail is scanned, mailscanner enters an endless loop - no messages are processed anymore. The instance dies and is being respawned over and over again.

Revision history for this message
Oliver Siegmar (osiegmar) wrote :

I could work around this problem by adding a '--chuid Debian-exim' parameter to the start-stop-daemon call in /etc/init.d/mailscanner -

start-stop-daemon --start --quiet --nicelevel $run_nice --chuid Debian-exim --exec $DAEMON --name $NAME -- $DAEMON_ARGS \
    || return 2

I could also find more people having the same problem:

http://ubuntuforums.org/showthread.php?t=1313599
http://www.howtoforge.com/the-perfect-spamsnake-ubuntu-jaunty-jackalope
http://www.bluequartz.us/phpBB2/viewtopic.php?t=108939

The problem seems to be, that the mailscanner version used in karmic and lucid is not compatible with Perl 5.10

Revision history for this message
Didier Conchaudron (dcn) wrote :

I'm running Lucid in server mode and am getting similar issue. Debug mode dropped the following:

In Debugging mode, not forking...
Trying to setlogsock(unix)
Building a message batch to scan...
Have a batch of 2 messages.
max message size is '200k'
max message size is '200k'
Insecure dependency in chown while running with -T switch at /usr/share/MailScanner//MailScanner/Message.pm line 2407.

Your pointed fix works for the moment. Many thanks!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.