Fix CVE-2019-7663 (#1677529)
This commit is contained in:
parent
d3eb5f17f7
commit
42c3833b52
39
libtiff-CVE-2019-7663.patch
Normal file
39
libtiff-CVE-2019-7663.patch
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
From 67c11eb5abaf36445650fac968667b62a3ccd0bb Mon Sep 17 00:00:00 2001
|
||||||
|
From: Thomas Bernard <miniupnp@free.fr>
|
||||||
|
Date: Mon, 11 Feb 2019 10:05:33 +0100
|
||||||
|
Subject: [PATCH] check that (Tile Width)*(Samples/Pixel) do no overflow
|
||||||
|
|
||||||
|
fixes bug 2833
|
||||||
|
---
|
||||||
|
tools/tiffcp.c | 8 +++++++-
|
||||||
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/tools/tiffcp.c b/tools/tiffcp.c
|
||||||
|
index 2f406e2..f0ee2c0 100644
|
||||||
|
--- a/tools/tiffcp.c
|
||||||
|
+++ b/tools/tiffcp.c
|
||||||
|
@@ -1408,7 +1408,7 @@ DECLAREreadFunc(readSeparateTilesIntoBuffer)
|
||||||
|
int status = 1;
|
||||||
|
uint32 imagew = TIFFRasterScanlineSize(in);
|
||||||
|
uint32 tilew = TIFFTileRowSize(in);
|
||||||
|
- int iskew = imagew - tilew*spp;
|
||||||
|
+ int iskew;
|
||||||
|
tsize_t tilesize = TIFFTileSize(in);
|
||||||
|
tdata_t tilebuf;
|
||||||
|
uint8* bufp = (uint8*) buf;
|
||||||
|
@@ -1416,6 +1416,12 @@ DECLAREreadFunc(readSeparateTilesIntoBuffer)
|
||||||
|
uint32 row;
|
||||||
|
uint16 bps = 0, bytes_per_sample;
|
||||||
|
|
||||||
|
+ if (spp > (0x7fffffff / tilew))
|
||||||
|
+ {
|
||||||
|
+ TIFFError(TIFFFileName(in), "Error, cannot handle that much samples per tile row (Tile Width * Samples/Pixel)");
|
||||||
|
+ return 0;
|
||||||
|
+ }
|
||||||
|
+ iskew = imagew - tilew*spp;
|
||||||
|
tilebuf = _TIFFmalloc(tilesize);
|
||||||
|
if (tilebuf == 0)
|
||||||
|
return 0;
|
||||||
|
--
|
||||||
|
2.17.2
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
Summary: Library of functions for manipulating TIFF format image files
|
Summary: Library of functions for manipulating TIFF format image files
|
||||||
Name: libtiff
|
Name: libtiff
|
||||||
Version: 4.0.10
|
Version: 4.0.10
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
License: libtiff
|
License: libtiff
|
||||||
URL: http://www.simplesystems.org/libtiff/
|
URL: http://www.simplesystems.org/libtiff/
|
||||||
|
|
||||||
@ -10,6 +10,7 @@ Source: ftp://ftp.simplesystems.org/pub/libtiff/tiff-%{version}.tar.gz
|
|||||||
Patch0: libtiff-am-version.patch
|
Patch0: libtiff-am-version.patch
|
||||||
Patch1: libtiff-make-check.patch
|
Patch1: libtiff-make-check.patch
|
||||||
Patch2: libtiff-CVE-2019-6128.patch
|
Patch2: libtiff-CVE-2019-6128.patch
|
||||||
|
Patch3: libtiff-CVE-2019-7663.patch
|
||||||
|
|
||||||
BuildRequires: gcc, gcc-c++
|
BuildRequires: gcc, gcc-c++
|
||||||
BuildRequires: zlib-devel libjpeg-devel jbigkit-devel
|
BuildRequires: zlib-devel libjpeg-devel jbigkit-devel
|
||||||
@ -61,6 +62,7 @@ image files using the libtiff library.
|
|||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
|
%patch3 -p1
|
||||||
|
|
||||||
# Use build system's libtool.m4, not the one in the package.
|
# Use build system's libtool.m4, not the one in the package.
|
||||||
rm -f libtool.m4
|
rm -f libtool.m4
|
||||||
@ -165,6 +167,9 @@ find html -name 'Makefile*' | xargs rm
|
|||||||
%{_mandir}/man1/*
|
%{_mandir}/man1/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Feb 15 2019 Nikola Forró <nforro@redhat.com> - 4.0.10-4
|
||||||
|
- Fix CVE-2019-7663 (#1677529)
|
||||||
|
|
||||||
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.10-3
|
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.10-3
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user