Bug 192266 - Attachments with invalid characters in name are not checked for viruses
Attachments with invalid characters in name are not checked for viruses
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: clamav (Show other bugs)
6
All Linux
medium Severity high
: ---
: ---
Assigned To: Enrico Scholz
Fedora Extras Quality Assurance
bzcl34nup
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-05-18 14:04 EDT by Patrick Monnerat
Modified: 2008-05-06 11:55 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-05-06 11:55:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
e-mail data to cause the bug (551 bytes, application/octet-stream)
2006-05-18 14:04 EDT, Patrick Monnerat
no flags Details
Patch to overcome the problem. (1.47 KB, patch)
2006-05-18 14:08 EDT, Patrick Monnerat
no flags Details | Diff

  None (edit)
Description Patrick Monnerat 2006-05-18 14:04:04 EDT
Description of problem:
clamav-milter cannot create temporary file if an attachment filename contains a
non-UTF8 character.

Version-Release number of selected component (if applicable):
0.88.2-1

How reproducible:
Always with the attached e-mail

Steps to Reproduce:
1. Send the attached e-mail to a sendmail server that uses clamav-milter
  
Actual results:
2 lines like the following are appended to /var/log/clamd.milter:
LibClamav Error: Can't create temporary file /tmp/clamav-55d9ecef35e0fab5/:
Invalid argument
LibClamav Error: fileblobDestroy: file not saved: report to bugs@clamav.net

Attachment is not checked for viruses.

Expected results:
No log and a proper virus check.

Additional info:
_Procedure rfc2047() processes string encoding, but not the character set (which
is skipped and ignored).
_ As a result, an attachment filename may contain ISO8859-1 characters (in
example), that are not valid UTF8 character.
_ Procedure fileblobSetFilename() uses the attachment name as a base of a
temporary file name, using snprintf() to build the full temporary file path, as
should be accepted by mkstemp().
_ The compilation options used while building the RPM cause the use of a
snprintf version that aborts the current format if an invalid UTF8 character
appears in a string argument, resulting in an invalid temporary filename.

The proposed patch does not fix the character set, but avoid the use of
snprintf() to build the temporary file name, resulting in a legal name (but
still containing invalid utf8 characters): that is sufficient to allow virus
checking in the attachment.
Comment 1 Patrick Monnerat 2006-05-18 14:04:04 EDT
Created attachment 129468 [details]
e-mail data to cause the bug
Comment 2 Patrick Monnerat 2006-05-18 14:08:19 EDT
Created attachment 129469 [details]
Patch to overcome the problem.

This patch does not fix the invalid character(s), but allows the creation of
temporary files. They may however have weird names...
Comment 3 Patrick Monnerat 2006-05-19 10:37:02 EDT
Raising severity to "high", since it may allow a virus designer to bypass clamav
checking.
Comment 4 Patrick Monnerat 2006-07-11 08:47:07 EDT
Problem still present in 0.88.3-1
Patch may be applied as is
Comment 5 Patrick Monnerat 2006-08-10 06:12:39 EDT
Problem still present in 0.88.4-1
Patch may be applied as is
Comment 6 Patrick Monnerat 2006-10-24 06:12:22 EDT
Problem still present in 0.88.5-1
Patch may be applied as is
  By the way: Does anybody uses clamav-milter ??? ;-)
Comment 7 Christian Iseli 2007-01-17 18:20:02 EST
FC3 and FC4 have now been EOL'd.

Please check the ticket against a current Fedora release, and either adjust the
release number, or close it if appropriate.

Thanks.

Your friendly BZ janitor :-)
Comment 8 Patrick Monnerat 2007-01-18 05:08:52 EST
Bug still present with clamav-milter-0.88.7-1.fc6
Patch still usable as is
Comment 9 Patrick Monnerat 2007-01-30 13:06:43 EST
Bug still present with clamav-milter-0.88.7-1.fc6
Patch still usable as is
Comment 10 Nigel Horne 2007-06-09 16:40:07 EDT
The initscript that is shipped with Fedora is not the one supplied upstream by
ClamAV. The upstream version works around the broken Fedora UTF-8 handling by
clearing the LANG variable. I suggest you try that trick.
Comment 11 Bug Zapper 2008-04-03 22:55:05 EDT
Fedora apologizes that these issues have not been resolved yet. We're
sorry it's taken so long for your bug to be properly triaged and acted
on. We appreciate the time you took to report this issue and want to
make sure no important bugs slip through the cracks.

If you're currently running a version of Fedora Core between 1 and 6,
please note that Fedora no longer maintains these releases. We strongly
encourage you to upgrade to a current Fedora release. In order to
refocus our efforts as a project we are flagging all of the open bugs
for releases which are no longer maintained and closing them.
http://fedoraproject.org/wiki/LifeCycle/EOL

If this bug is still open against Fedora Core 1 through 6, thirty days
from now, it will be closed 'WONTFIX'. If you can reporduce this bug in
the latest Fedora version, please change to the respective version. If
you are unable to do this, please add a comment to this bug requesting
the change.

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we are following is outlined here:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.

And if you'd like to join the bug triage team to help make things
better, check out http://fedoraproject.org/wiki/BugZappers
Comment 12 Bug Zapper 2008-05-06 11:55:12 EDT
This bug is open for a Fedora version that is no longer maintained and
will not be fixed by Fedora. Therefore we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen thus bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.