Bug 1002714 (CVE-2013-1438, CVE-2013-1439)

Summary: CVE-2013-1438 CVE-2013-1439 LibRaw: multiple denial of service flaws
Product: [Other] Security Response Reporter: Vincent Danen <vdanen>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: debarshir, jan.klepek, jkurik, limburgher, nphilipp, sebastian, siddharth.kde, thibault.north
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: impact=low,public=20130828,reported=20130829,source=oss-security,cvss2=4.3/AV:N/AC:M/Au:N/C:N/I:N/A:P,fedora-all/LibRaw=affected,rhel-7/LibRaw=wontfix,rhel-5/dcraw=wontfix,rhel-6/dcraw=wontfix,rhel-7/dcraw=wontfix,fedora-all/dcraw=affected,fedora-all/ufraw=affected,fedora-19/LibRaw=affected,fedora-19/dcraw=affected,fedora-19/ufraw=affected,fedora-all/rawtherapee=affected
Fixed In Version: LibRaw 0.15.4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-21 23:24:48 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On: 1002717, 1002718, 1011752, 1011753, 1014011, 1063126    
Bug Blocks: 1002723    

Description Vincent Danen 2013-08-29 14:57:54 EDT
Raphael Geissert reported two denial of service flaws in LibRaw [1]:

CVE-2013-1438:

Specially crafted photo files may trigger a division by zero, an
infinite loop, or a null pointer dereference in libraw leading to
denial of service in applications using the library.
These vulnerabilities appear to originate in dcraw and as such any
program or library based on it is affected. To name a few confirmed
applications: dcraw, ufraw. Other affected software: shotwell,
darktable, and libkdcraw (Qt-style interface to libraw, using embedded
copy) which is used by digikam.

Google Picasa apparently uses dcraw/ufraw so it might be affected.
dcraw's homepage has a list of applications that possibly still use
it:
http://cybercom.net/~dcoffin/dcraw/

Affected versions of libraw: confirmed: 0.8-0.15.3; but it is likely
that all versions are affected.

Fixed in: libraw 0.15.4

CVE-2013-1439:

Specially crafted photo files may trigger a series of conditions in
which a null pointer is dereferenced leading to denial of service in
applications using the library. These three vulnerabilities are
in/related to the 'faster LJPEG decoder', which upstream states was
introduced in LibRaw 0.13 and support for which is going to be dropped
in 0.16.

Affected versions of libraw: 0.13.x-0.15.x

Fixed in: libraw 0.15.4

Patches:
0.15.x:
https://github.com/LibRaw/LibRaw/commit/11909cc59e712e09b508dda729b99aeaac2b29ad
Future 0.16.x:
https://github.com/LibRaw/LibRaw/commit/9ae25d8c3a6bfb40c582538193264f74c9b93bc0

(upstream decided to commit all fixes in a single commit. The missing
changes in the patch for 0.16 are the ones that correspond to
CVE-2013-4139. I.e. 0.16 patchset is CVE-2013-1438, while the 0.15
patchset is CVE-2013-4138 + CVE-2013-4139.)

Upstream states that there will be backported fixes for the 0.14
branch but there won't be any new release and "[they] should use
0.14-stable branch from github repo".
Comment 2 Vincent Danen 2013-08-29 15:00:08 EDT
Created LibRaw tracking bugs for this issue:

Affects: fedora-all [bug 1002717]
Comment 3 Huzaifa S. Sidhpurwala 2013-09-25 01:14:06 EDT
Created dcraw tracking bugs for this issue:

Affects: fedora-all [bug 1011753]
Comment 5 Nils Philippsen 2013-09-25 09:34:12 EDT
I've checked out the commits fixing the issue(s) in LibRaw, and it seems as if only CVE-2013-1438 applies to dcraw, as CVE-2013-1439 affects the "faster LJPEG decoder" which is only in LibRaw, and there only in versions 0.13.x-0.15.x. Do you concur?

Should we have a separate bug for this issue in ufraw, or shall I handle it in the context of dcraw?
Comment 7 Huzaifa S. Sidhpurwala 2013-10-01 05:12:44 EDT
Created ufraw tracking bugs for this issue:

Affects: fedora-all [bug 1014011]
Comment 8 Fedora Update System 2013-12-16 17:59:58 EST
dcraw-9.19-4.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 9 Fedora Update System 2013-12-16 18:02:17 EST
ufraw-0.19.2-10.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 10 Fedora Update System 2013-12-16 18:04:54 EST
dcraw-9.19-4.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 11 Fedora Update System 2013-12-16 18:05:35 EST
ufraw-0.19.2-10.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 12 Fedora Update System 2013-12-17 14:11:59 EST
ufraw-0.19.2-10.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 13 Fedora Update System 2013-12-17 14:15:45 EST
dcraw-9.19-4.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 14 Debarshi Ray 2014-01-08 05:16:43 EST
This is the patch for the 0.14-stable series: https://github.com/LibRaw/LibRaw/commit/c4e374ea6c979a7d1d968f5082b7d0ea8cd27202
Comment 15 Murray McAllister 2014-02-10 00:00:31 EST
According to https://bugs.mageia.org/show_bug.cgi?id=12693 and https://bugs.mageia.org/show_bug.cgi?id=11149#c14 the version of rawtherapee in Fedora is vulnerable to CVE-2013-1438
Comment 16 Murray McAllister 2014-02-10 00:06:30 EST
Created rawtherapee tracking bugs for this issue:

Affects: fedora-all [bug 1063126]
Comment 17 Vincent Danen 2015-08-21 23:24:35 EDT
Statement:

Red Hat Product Security has rated this issue as having Low security impact. This issue is not currently planned to be addressed in future updates. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.