Bug 474317 (CVE-2008-5314)

Summary: CVE-2008-5314 clamav: DoS / crash via crafted jpeg image
Product: [Other] Security Response Reporter: Tomas Hoger <thoger>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: redhat-bugzilla, rh-bugzilla, robert.scheck, steve
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-29 09:21:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Upstream patch
none
Test case from the upstream bug report none

Description Tomas Hoger 2008-12-03 10:09:46 UTC
Upstream clamav version 0.94.2 was released, which fixes an issue with stack overflow caused by deep recursion triggered by a crafted jpeg image.

Upstream bug report:
https://wwws.clamav.net/bugzilla/show_bug.cgi?id=1266

Upstream patch:
svn diff -c 4478 http://svn.clamav.net/svn/clamav-devel/

Comment 1 Tomas Hoger 2008-12-03 10:10:26 UTC
Created attachment 325508 [details]
Upstream patch

svn diff -c 4478 http://svn.clamav.net/svn/clamav-devel/

Comment 2 Tomas Hoger 2008-12-03 10:11:09 UTC
Created attachment 325509 [details]
Test case from the upstream bug report

https://wwws.clamav.net/bugzilla/show_bug.cgi?id=1266

Comment 3 Tomas Hoger 2008-12-03 10:16:10 UTC
JPEG file generated by the test case in comment #2 crashes clamav with outdated virus DB (e.g. one installed on F9 from Fedora archives), but no longer crashes clamav with up-to-date DB files (as noted in the upstream bug, affected functionality was disabled in the affected versions).

So we're back at the old, yet still unanswered question:
  https://bugzilla.redhat.com/show_bug.cgi?id=470783#c11

Is it worth backporting patches to older versions, when the affected code remains disabled there anyway, so they are not really affected in most cases, just clamav is getting more and more crippled in the time?

Comment 4 Robert Scheck 2008-12-03 10:33:29 UTC
Tomas, I think you should forward this question upstream, as I got different inofficial replies by them. Maybe as Security Team you've a better chance to
get a real answer how things should be and how it behaved in the past.

EPEL 4 and 5 as well as Fedora 10 and Rawhide are already on the new version;
only Fedora 8 and Fedora 9 maybe need to get backported or whatever turns out
after the ClamAV upstream response.

Comment 5 Tomas Hoger 2008-12-03 17:13:22 UTC
CVE id CVE-2008-5314 was assigned to this issue:

Stack consumption vulnerability in libclamav/special.c in ClamAV
before 0.94.2 allows remote attackers to cause a denial of service
(daemon crash) via a crafted JPEG file, related to the
cli_check_jpeg_exploit, jpeg_check_photoshop, and
jpeg_check_photoshop_8bim functions.

Comment 6 Fedora Update System 2008-12-07 04:20:34 UTC
clamav-0.94.2-1.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.