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 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.
Created attachment 129468 [details] e-mail data to cause the bug
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...
Raising severity to "high", since it may allow a virus designer to bypass clamav checking.
Problem still present in 0.88.3-1 Patch may be applied as is
Problem still present in 0.88.4-1 Patch may be applied as is
Problem still present in 0.88.5-1 Patch may be applied as is By the way: Does anybody uses clamav-milter ??? ;-)
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 :-)
Bug still present with clamav-milter-0.88.7-1.fc6 Patch still usable as is
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.
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
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.