mirror of
https://git.yoctoproject.org/poky
synced 2026-04-04 05:02:21 +02:00
tiff: fix CVE-2023-40745
libtiff: integer overflow in tiffcp.c References: https://security-tracker.debian.org/tracker/CVE-2023-40745 https://gitlab.com/libtiff/libtiff/-/issues/591 https://bugzilla.redhat.com/show_bug.cgi?id=2235265 (From OE-Core rev: c3d4fbeb51278a04a6800c894c681733ad2259ca) Signed-off-by: Yogita Urade <yogita.urade@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
b1650772a2
commit
1843db6ae3
35
meta/recipes-multimedia/libtiff/files/CVE-2023-40745.patch
Normal file
35
meta/recipes-multimedia/libtiff/files/CVE-2023-40745.patch
Normal file
@@ -0,0 +1,35 @@
|
||||
From 4fc16f649fa2875d5c388cf2edc295510a247ee5 Mon Sep 17 00:00:00 2001
|
||||
From: Arie Haenel <arie.haenel@jct.ac.il>
|
||||
Date: Thu, 14 Sep 2023 04:31:35 +0000
|
||||
Subject: [PATCH] tiffcp: fix memory corruption (overflow) on hostile images
|
||||
(fixes #591)
|
||||
|
||||
CVE: CVE-2023-40745
|
||||
|
||||
Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/commit/4fc16f649fa2875d5c388cf2edc295510a247ee5]
|
||||
|
||||
Signed-off-by: Yogita Urade <yogita.urade@windriver.com>
|
||||
---
|
||||
tools/tiffcp.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/tools/tiffcp.c b/tools/tiffcp.c
|
||||
index 3b2d1dd..57fa6e8 100644
|
||||
--- a/tools/tiffcp.c
|
||||
+++ b/tools/tiffcp.c
|
||||
@@ -1754,6 +1754,13 @@ DECLAREreadFunc(readSeparateTilesIntoBuffer)
|
||||
"Width * Samples/Pixel)");
|
||||
return 0;
|
||||
}
|
||||
+
|
||||
+ if ( (imagew - tilew * spp) > INT_MAX ){
|
||||
+ TIFFError(TIFFFileName(in),
|
||||
+ "Error, image raster scan line size is too large");
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
iskew = imagew - tilew * spp;
|
||||
tilebuf = limitMalloc(tilesize);
|
||||
if (tilebuf == 0)
|
||||
--
|
||||
2.35.5
|
||||
@@ -8,7 +8,9 @@ LIC_FILES_CHKSUM = "file://LICENSE.md;md5=a3e32d664d6db1386b4689c8121531c3"
|
||||
|
||||
CVE_PRODUCT = "libtiff"
|
||||
|
||||
SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz"
|
||||
SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \
|
||||
file://CVE-2023-40745.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "d7f38b6788e4a8f5da7940c5ac9424f494d8a79eba53d555f4a507167dca5e2b"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user