mirror of
https://git.yoctoproject.org/poky
synced 2026-04-28 06:32:34 +02:00
tiff: Security fix for CVE-2023-40745
Upstream-Status: Backport from 4fc16f649f
(From OE-Core rev: d282b85cf69ecfbce12224428c713cd0dc639ced)
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
This commit is contained in:
committed by
Steve Sakoman
parent
5e9e6627ac
commit
cd9a699320
34
meta/recipes-multimedia/libtiff/files/CVE-2023-40745.patch
Normal file
34
meta/recipes-multimedia/libtiff/files/CVE-2023-40745.patch
Normal file
@@ -0,0 +1,34 @@
|
||||
From 4fc16f649fa2875d5c388cf2edc295510a247ee5 Mon Sep 17 00:00:00 2001
|
||||
From: Arie Haenel <arie.haenel@jct.ac.il>
|
||||
Date: Wed, 19 Jul 2023 19:34:25 +0000
|
||||
Subject: [PATCH] tiffcp: fix memory corruption (overflow) on hostile images
|
||||
(fixes #591)
|
||||
|
||||
Upstream-Status: Backport from [https://gitlab.com/libtiff/libtiff/-/commit/4fc16f649fa2875d5c388cf2edc295510a247ee5]
|
||||
CVE: CVE-2023-40745
|
||||
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
---
|
||||
tools/tiffcp.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/tools/tiffcp.c b/tools/tiffcp.c
|
||||
index 83b3910..007bd05 100644
|
||||
--- a/tools/tiffcp.c
|
||||
+++ b/tools/tiffcp.c
|
||||
@@ -1437,6 +1437,13 @@ DECLAREreadFunc(readSeparateTilesIntoBuffer)
|
||||
TIFFError(TIFFFileName(in), "Error, cannot handle that much samples per tile row (Tile 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 = _TIFFmalloc(tilesize);
|
||||
if (tilebuf == 0)
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -45,6 +45,7 @@ SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \
|
||||
file://CVE-2023-3316.patch \
|
||||
file://CVE-2023-3576.patch \
|
||||
file://CVE-2023-3618.patch \
|
||||
file://CVE-2023-40745.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "2165e7aba557463acc0664e71a3ed424"
|
||||
SRC_URI[sha256sum] = "5d29f32517dadb6dbcd1255ea5bbc93a2b54b94fbf83653b4d65c7d6775b8634"
|
||||
|
||||
Reference in New Issue
Block a user