summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorYogita Urade <yogita.urade@windriver.com>2025-09-30 13:47:48 +0530
committerSteve Sakoman <steve@sakoman.com>2025-10-09 12:16:45 -0700
commit2ce56bd707939989cffa77944943e76cbe502d87 (patch)
tree1a4967c8c3669cc71122fa521cd31e96057182d7 /meta
parenteae801c832ab1a8d5ef970c58db9dc1fea47fa3b (diff)
downloadpoky-2ce56bd707939989cffa77944943e76cbe502d87.tar.gz
tiff: fix CVE-2025-9900
A flaw was found in Libtiff. This vulnerability is a "write-what-where" condition, triggered when the library processes a specially crafted TIFF image file.[EOL][EOL]By providing an abnormally large image height value in the file's metadata, an attacker can trick the library into writing attacker-controlled color data to an arbitrary memory location. This memory corruption can be exploited to cause a denial of service (application crash) or to achieve arbitrary code execution with the permissions of the user. Reference: https://nvd.nist.gov/vuln/detail/CVE-2025-9900 Upstream patch: https://gitlab.com/libtiff/libtiff/-/commit/3e0dcf0ec651638b2bd849b2e6f3124b36890d99 (From OE-Core rev: c1303b8eb4e85a031a175867361876a256bfb763) Signed-off-by: Yogita Urade <yogita.urade@windriver.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-multimedia/libtiff/tiff/CVE-2025-9900.patch54
-rw-r--r--meta/recipes-multimedia/libtiff/tiff_4.6.0.bb1
2 files changed, 55 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/libtiff/tiff/CVE-2025-9900.patch b/meta/recipes-multimedia/libtiff/tiff/CVE-2025-9900.patch
new file mode 100644
index 0000000000..97858163e2
--- /dev/null
+++ b/meta/recipes-multimedia/libtiff/tiff/CVE-2025-9900.patch
@@ -0,0 +1,54 @@
1From 3e0dcf0ec651638b2bd849b2e6f3124b36890d99 Mon Sep 17 00:00:00 2001
2From: Su Laus <sulau@freenet.de>
3Date: Wed, 11 Jun 2025 19:45:19 +0000
4Subject: [PATCH] tif_getimage.c: Fix buffer underflow crash for less raster
5 rows at TIFFReadRGBAImageOriented()
6
7CVE: CVE-2025-9900
8Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/commit/3e0dcf0ec651638b2bd849b2e6f3124b36890d99]
9
10Signed-off-by: Yogita Urade <yogita.urade@windriver.com>
11---
12 libtiff/tif_getimage.c | 20 +++++++++++++++++---
13 1 file changed, 17 insertions(+), 3 deletions(-)
14
15diff --git a/libtiff/tif_getimage.c b/libtiff/tif_getimage.c
16index 3c9fc4f..fc8b22e 100644
17--- a/libtiff/tif_getimage.c
18+++ b/libtiff/tif_getimage.c
19@@ -600,6 +600,22 @@ int TIFFRGBAImageGet(TIFFRGBAImage *img, uint32_t *raster, uint32_t w,
20 "No \"put\" routine setupl; probably can not handle image format");
21 return (0);
22 }
23+ /* Verify raster width and height against image width and height. */
24+ if (h > img->height)
25+ {
26+ /* Adapt parameters to read only available lines and put image at
27+ * the bottom of the raster. */
28+ raster += (size_t)(h - img->height) * w;
29+ h = img->height;
30+ }
31+ if (w > img->width)
32+ {
33+ TIFFWarningExtR(img->tif, TIFFFileName(img->tif),
34+ "Raster width of %d shall not be larger than image "
35+ "width of %d -> raster width adapted for reading",
36+ w, img->width);
37+ w = img->width;
38+ }
39 return (*img->get)(img, raster, w, h);
40 }
41
42@@ -617,9 +633,7 @@ int TIFFReadRGBAImageOriented(TIFF *tif, uint32_t rwidth, uint32_t rheight,
43 if (TIFFRGBAImageOK(tif, emsg) && TIFFRGBAImageBegin(&img, tif, stop, emsg))
44 {
45 img.req_orientation = (uint16_t)orientation;
46- /* XXX verify rwidth and rheight against width and height */
47- ok = TIFFRGBAImageGet(&img, raster + (rheight - img.height) * rwidth,
48- rwidth, img.height);
49+ ok = TIFFRGBAImageGet(&img, raster, rwidth, rheight);
50 TIFFRGBAImageEnd(&img);
51 }
52 else
53--
542.40.0
diff --git a/meta/recipes-multimedia/libtiff/tiff_4.6.0.bb b/meta/recipes-multimedia/libtiff/tiff_4.6.0.bb
index 6bf7010ba2..1d3d08ff9d 100644
--- a/meta/recipes-multimedia/libtiff/tiff_4.6.0.bb
+++ b/meta/recipes-multimedia/libtiff/tiff_4.6.0.bb
@@ -17,6 +17,7 @@ SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \
17 file://CVE-2023-52355-0002.patch \ 17 file://CVE-2023-52355-0002.patch \
18 file://CVE-2023-52356.patch \ 18 file://CVE-2023-52356.patch \
19 file://CVE-2024-7006.patch \ 19 file://CVE-2024-7006.patch \
20 file://CVE-2025-9900.patch \
20 " 21 "
21 22
22SRC_URI[sha256sum] = "88b3979e6d5c7e32b50d7ec72fb15af724f6ab2cbf7e10880c360a77e4b5d99a" 23SRC_URI[sha256sum] = "88b3979e6d5c7e32b50d7ec72fb15af724f6ab2cbf7e10880c360a77e4b5d99a"