amavis does not handle encrypted 7z archives properly

Patrick Schönfeld patrick.schoenfeld at gmail.com
Tue Apr 30 13:12:52 CEST 2013


Hi,

in a customer setup, we noticed that amavis is unable to detect that a
7z-archive is encrypted. Instead it tries to unpack the archive, leading to
an error, noted in the logfile:

Apr 29 09:59:38 xxxxxxx amavis[19867]: (19867-13) (!!)collect_results
from [20546] (/usr/bin/7za): exit 2 \n7-Zip (A) 9.04 beta  Copyright
(c) 1999-2009 Igor Pavlov  2009-05-30\np7zip Version 9.04
(locale=de_DE.UTF-8,Utf16=on,HugeFiles=on,4 CPUs)\n\nProcessing
archive: /var/lib/amavis/tmp/amavis-20130429T094804-19867-pH04PqTN/parts/p003\n\n\nEnter
password (will not be echoed) :Extracting  foobar.xxx     Data Error
in encrypted file. Wrong password?\n\nSub items Errors: 1\n\n

I had a quick glance at the source and noticed that
Amavis::Unpackers::do_7zip does not even check for encrypted flags.
As other unpackers apparently handle this, I think this is a bug.

Notes for a bugfix:
A call of "7z l -slt" (which is executed anyway) gives all information
needed, printing a line

Encrypted = +

for every encrypted part in the archive and

Encrypted = -

for non-encrypted archives. Apart from that, the encryption algorithm is
reflected in the method attribute of the 7z file itself, e.g.

Method = LZMA 7zAES

Best Regards,
Patrick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.amavis.org/pipermail/amavis-users/attachments/20130430/70f55e0f/attachment.html>


More information about the amavis-users mailing list