From 63afa2c4487933f7fa72492682f23cc179677eca Mon Sep 17 00:00:00 2001 From: Josef Ridky Date: Wed, 11 Jul 2018 11:33:49 +0200 Subject: [PATCH] Fix CVE-2017-14608 --- dcraw-CVE-2017-14608.patch | 21 +++++++++++++++++++++ dcraw.spec | 2 ++ 2 files changed, 23 insertions(+) create mode 100644 dcraw-CVE-2017-14608.patch diff --git a/dcraw-CVE-2017-14608.patch b/dcraw-CVE-2017-14608.patch new file mode 100644 index 0000000..8f7de24 --- /dev/null +++ b/dcraw-CVE-2017-14608.patch @@ -0,0 +1,21 @@ +diff -urNp old/dcraw.c new/dcraw.c +--- old/dcraw.c 2018-07-11 10:53:51.141803505 +0200 ++++ new/dcraw.c 2018-07-11 11:30:08.850528389 +0200 +@@ -2627,8 +2627,15 @@ void CLASS kodak_65000_load_raw() + len = MIN (256, width-col); + ret = kodak_65000_decode (buf, len); + for (i=0; i < len; i++) +- if ((RAW(row,col+i) = curve[ret ? buf[i] : +- (pred[i & 1] += buf[i])]) >> 12) derror(); ++ { ++ int idx = ret ? buf[i] : (pred[i & 1] += buf[i]); ++ if(idx >=0 && idx <= 0xffff) ++ { ++ if ((RAW(row,col+i) = curve[idx]) >> 12) derror(); ++ } ++ else ++ derror(); ++ } + } + } + diff --git a/dcraw.spec b/dcraw.spec index 8a771bc..da07a50 100644 --- a/dcraw.spec +++ b/dcraw.spec @@ -8,6 +8,7 @@ Source0: http://cybercom.net/~dcoffin/dcraw/archive/dcraw-%{version}.tar.gz Patch0: dcraw-9.21-lcms2-error-reporting.patch Patch1: dcraw-CVE-2018-5801.patch Patch2: dcraw-CVE-2017-13735.patch +Patch3: dcraw-CVE-2017-14608.patch BuildRequires: gcc BuildRequires: gettext BuildRequires: libjpeg-devel @@ -68,6 +69,7 @@ done %changelog * Wed Jul 11 2018 Josef Ridky - 9.28.0-2 - Fix CVE-2017-13735 (#1488932) +- Fix CVE-2017-14608 (#1499687) * Thu Jun 14 2018 Josef Ridky - 9.28.0-1 - New upstream release 9.28.0 (#1585348)