Skip to content

Commit 15e60d9

Browse files
[AutoPR- Security] Patch libtiff for CVE-2025-9900 [HIGH] (#14736)
(cherry picked from commit f98f349)
1 parent 76a9b76 commit 15e60d9

File tree

2 files changed

+58
-1
lines changed

2 files changed

+58
-1
lines changed

SPECS/libtiff/CVE-2025-9900.patch

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
From 14b8aed9744bb89a75e3fe481743c13c2cc536ac Mon Sep 17 00:00:00 2001
2+
From: Su Laus <[email protected]>
3+
Date: Wed, 11 Jun 2025 19:45:19 +0000
4+
Subject: [PATCH] tif_getimage.c: Fix buffer underflow crash for less raster
5+
rows at TIFFReadRGBAImageOriented()
6+
7+
Signed-off-by: Azure Linux Security Servicing Account <[email protected]>
8+
Upstream-reference: https://gitlab.com/libtiff/libtiff/-/commit/3e0dcf0ec651638b2bd849b2e6f3124b36890d99.patch
9+
---
10+
libtiff/tif_getimage.c | 20 +++++++++++++++++---
11+
1 file changed, 17 insertions(+), 3 deletions(-)
12+
13+
diff --git a/libtiff/tif_getimage.c b/libtiff/tif_getimage.c
14+
index 6fee35d..08fdd5e 100644
15+
--- a/libtiff/tif_getimage.c
16+
+++ b/libtiff/tif_getimage.c
17+
@@ -600,6 +600,22 @@ int TIFFRGBAImageGet(TIFFRGBAImage *img, uint32_t *raster, uint32_t w,
18+
"No \"put\" routine setupl; probably can not handle image format");
19+
return (0);
20+
}
21+
+ /* Verify raster width and height against image width and height. */
22+
+ if (h > img->height)
23+
+ {
24+
+ /* Adapt parameters to read only available lines and put image at
25+
+ * the bottom of the raster. */
26+
+ raster += (size_t)(h - img->height) * w;
27+
+ h = img->height;
28+
+ }
29+
+ if (w > img->width)
30+
+ {
31+
+ TIFFWarningExtR(img->tif, TIFFFileName(img->tif),
32+
+ "Raster width of %d shall not be larger than image "
33+
+ "width of %d -> raster width adapted for reading",
34+
+ w, img->width);
35+
+ w = img->width;
36+
+ }
37+
return (*img->get)(img, raster, w, h);
38+
}
39+
40+
@@ -617,9 +633,7 @@ int TIFFReadRGBAImageOriented(TIFF *tif, uint32_t rwidth, uint32_t rheight,
41+
if (TIFFRGBAImageOK(tif, emsg) && TIFFRGBAImageBegin(&img, tif, stop, emsg))
42+
{
43+
img.req_orientation = (uint16_t)orientation;
44+
- /* XXX verify rwidth and rheight against width and height */
45+
- ok = TIFFRGBAImageGet(&img, raster + (rheight - img.height) * rwidth,
46+
- rwidth, img.height);
47+
+ ok = TIFFRGBAImageGet(&img, raster, rwidth, rheight);
48+
TIFFRGBAImageEnd(&img);
49+
}
50+
else
51+
--
52+
2.45.4
53+

SPECS/libtiff/libtiff.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Summary: TIFF libraries and associated utilities.
22
Name: libtiff
33
Version: 4.6.0
4-
Release: 8%{?dist}
4+
Release: 9%{?dist}
55
License: libtiff
66
Vendor: Microsoft Corporation
77
Distribution: Mariner
@@ -18,6 +18,7 @@ Patch6: CVE-2025-8177.patch
1818
Patch7: CVE-2025-8534.patch
1919
Patch8: CVE-2025-8851.patch
2020
Patch9: CVE-2025-9165.patch
21+
Patch10: CVE-2025-9900.patch
2122
BuildRequires: autoconf
2223
BuildRequires: automake
2324
BuildRequires: libjpeg-turbo-devel
@@ -70,6 +71,9 @@ make %{?_smp_mflags} -k check
7071
%{_docdir}/*
7172

7273
%changelog
74+
* Mon Sep 29 2025 Azure Linux Security Servicing Account <[email protected]> - 4.6.0-9
75+
- Patch for CVE-2025-9900
76+
7377
* Thu Aug 21 2025 Azure Linux Security Servicing Account <[email protected]> - 4.6.0-8
7478
- Patch for CVE-2025-9165, CVE-2025-8851
7579

0 commit comments

Comments
 (0)