Sophie 3.05 encrypted file issues

Jay <[email protected]> Tue, 06 Dec 2005 14:02:32 +0800
Newsgroups gmane.comp.security.virus.vtools
Message-ID <[email protected]>
Hi All,

I have just upgraded my mailserver to Sophie 3.05 and 
libsavi.so.3.2.07.119 using amavisd-new-2.3.1

NOTICE           : Sophie configuration file not specified - falling 
back to defaults
NOTICE           : Using Sophie configuration file '/etc/sophie.cfg'
NOTICE           : Setting configuration options - please wait...
NOTICE           : Configuration options set
Sophos engine    : Sophos engine version 2.32
Sophie IDE       : Sophos IDE version 4.00 (detects 114935 viruses)
SAVI config      : /etc/sophie.savi
Max processes    : 20
Socket path      : /var/run/sophie
Umask            : 7
PID file         : /var/run/sophie.pid
Timeout          : 300 seconds
Running as user  : amavis
Socket group     : amavis
Logname          : sophie
Log facility     : 16 (mail)
Log priority     : 5 (notice)
Error strings?   : yes
Timestamps?      : no
Show virus name? : yes
Callbacks?       : yes
limit_classif    : 10
limit_nextfile   : 10000
limit_decompr    : 1000
socket_check     : yes
Sophie version   : 3.05
NOTICE           : pSAVI cleaned up and released/terminated


When someone sends through an email with a password protected zip file 
the following is shown in the maillog:

Dec  6 04:28:12 xxxxxxxx sophie[32719]: Sophie child has timed-out (no 
data received in 300 seconds) - process killed
Dec  6 04:28:12 xxxxxxxx sophie[1036]: WARNING          : Error: File 
was encrypted
Dec  6 04:28:12 xxxxxxxx amavis[508]: (00508-01) ask_av (Sophie) FAILED 
- unexpected result: -1:Error: File was encrypted
Dec  6 04:28:12 xxxxxxxx amavis[508]: (00508-01) WARN: all primary virus 
scanners failed, considering backups
Dec  6 04:28:12 xxxxxxxx amavis[508]: (00508-01) TROUBLE in check_mail: 
virus_scan FAILED: virus_scan: ALL VIRUS SCANNERS FAILED:
Dec  6 04:28:12 xxxxxxxx amavis[508]: (00508-01) PRESERVING EVIDENCE in 
/mnt/tmpfs/amavis/amavis-20051206T042306-00508

The message is subsequently not delivered and stored in /mnt/tmpfs/amavis/

This is very much different behaviour than previous versions of Sophie 
where a password protected zip would not be scanned but would still be 
delivered.

I think it maybe due to this change listed in the Sophie 3.05 changelog:
- Bug fix for sophie_scandir problem. Sophie would not report
corrupt, password protected, etc files when performing directory
scans. It has been changed to return the "worst" result now. If
there is an infected file with a scanned directory, the
infected return code (1) is returned. If, however, the directory
(and all sub-directories) are clean, but there is at least one
error (corrupt, password protected, etc) file, Sophie will return
the error return code (-1). Only if all files are clean and
error free will the OK (0) code be returned.

This change appears to indicate that "-1" will be returned when 
sophie_scandir is called, but according to the output in the maillog it 
is also being returned when a single file sent from amavis is being 
scanned and amavis does not know what "-1" means?
Is this intentional behaviour, or is this an oversight with this change?

I have managed to work around this for the time being by enabling sweep 
as a fallback scanner in amavis, as sweep does not return an error with 
password protected zips. This isn't ideal and I was hoping someone here 
could shed some light on this.

Thanks for your time

Regards
Jay