Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions SPECS/libtiff/CVE-2025-9900.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
From 14b8aed9744bb89a75e3fe481743c13c2cc536ac Mon Sep 17 00:00:00 2001
From: Su Laus <[email protected]>
Date: Wed, 11 Jun 2025 19:45:19 +0000
Subject: [PATCH] tif_getimage.c: Fix buffer underflow crash for less raster
rows at TIFFReadRGBAImageOriented()

Signed-off-by: Azure Linux Security Servicing Account <[email protected]>
Upstream-reference: https://gitlab.com/libtiff/libtiff/-/commit/3e0dcf0ec651638b2bd849b2e6f3124b36890d99.patch
---
libtiff/tif_getimage.c | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/libtiff/tif_getimage.c b/libtiff/tif_getimage.c
index 6fee35d..08fdd5e 100644
--- a/libtiff/tif_getimage.c
+++ b/libtiff/tif_getimage.c
@@ -600,6 +600,22 @@ int TIFFRGBAImageGet(TIFFRGBAImage *img, uint32_t *raster, uint32_t w,
"No \"put\" routine setupl; probably can not handle image format");
return (0);
}
+ /* Verify raster width and height against image width and height. */
+ if (h > img->height)
+ {
+ /* Adapt parameters to read only available lines and put image at
+ * the bottom of the raster. */
+ raster += (size_t)(h - img->height) * w;
+ h = img->height;
+ }
+ if (w > img->width)
+ {
+ TIFFWarningExtR(img->tif, TIFFFileName(img->tif),
+ "Raster width of %d shall not be larger than image "
+ "width of %d -> raster width adapted for reading",
+ w, img->width);
+ w = img->width;
+ }
return (*img->get)(img, raster, w, h);
}

@@ -617,9 +633,7 @@ int TIFFReadRGBAImageOriented(TIFF *tif, uint32_t rwidth, uint32_t rheight,
if (TIFFRGBAImageOK(tif, emsg) && TIFFRGBAImageBegin(&img, tif, stop, emsg))
{
img.req_orientation = (uint16_t)orientation;
- /* XXX verify rwidth and rheight against width and height */
- ok = TIFFRGBAImageGet(&img, raster + (rheight - img.height) * rwidth,
- rwidth, img.height);
+ ok = TIFFRGBAImageGet(&img, raster, rwidth, rheight);
TIFFRGBAImageEnd(&img);
}
else
--
2.45.4

6 changes: 5 additions & 1 deletion SPECS/libtiff/libtiff.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Summary: TIFF libraries and associated utilities.
Name: libtiff
Version: 4.6.0
Release: 8%{?dist}
Release: 9%{?dist}
License: libtiff
Vendor: Microsoft Corporation
Distribution: Mariner
Expand All @@ -18,6 +18,7 @@ Patch6: CVE-2025-8177.patch
Patch7: CVE-2025-8534.patch
Patch8: CVE-2025-8851.patch
Patch9: CVE-2025-9165.patch
Patch10: CVE-2025-9900.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libjpeg-turbo-devel
Expand Down Expand Up @@ -70,6 +71,9 @@ make %{?_smp_mflags} -k check
%{_docdir}/*

%changelog
* Mon Sep 29 2025 Azure Linux Security Servicing Account <[email protected]> - 4.6.0-9
- Patch for CVE-2025-9900

* Thu Aug 21 2025 Azure Linux Security Servicing Account <[email protected]> - 4.6.0-8
- Patch for CVE-2025-9165, CVE-2025-8851

Expand Down
Loading