From 12a42297868c0c1457da8609a1596edde8335122 Mon Sep 17 00:00:00 2001 From: AlmaLinux RelEng Bot Date: Wed, 8 Apr 2026 11:57:40 -0400 Subject: [PATCH] import UBI libtiff-4.6.0-6.el10_1.2 --- libtiff-4.6.0-CVE-2023-52356.patch | 33 ++++++++++++++++++++++++++++++ libtiff.spec | 9 +++++++- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 libtiff-4.6.0-CVE-2023-52356.patch diff --git a/libtiff-4.6.0-CVE-2023-52356.patch b/libtiff-4.6.0-CVE-2023-52356.patch new file mode 100644 index 0000000..a492249 --- /dev/null +++ b/libtiff-4.6.0-CVE-2023-52356.patch @@ -0,0 +1,33 @@ +diff --git a/libtiff/tif_getimage.c b/libtiff/tif_getimage.c +index 41f7dfd77e00cd878304f7a43b753efd15f75338..6fee35db28ed4682699a9c0cbdbc96134dc751e8 100644 +--- a/libtiff/tif_getimage.c ++++ b/libtiff/tif_getimage.c +@@ -3224,6 +3224,13 @@ int TIFFReadRGBAStripExt(TIFF *tif, uint32_t row, uint32_t *raster, + if (TIFFRGBAImageOK(tif, emsg) && + TIFFRGBAImageBegin(&img, tif, stop_on_error, emsg)) + { ++ if (row >= img.height) ++ { ++ TIFFErrorExtR(tif, TIFFFileName(tif), ++ "Invalid row passed to TIFFReadRGBAStrip()."); ++ TIFFRGBAImageEnd(&img); ++ return (0); ++ } + + img.row_offset = row; + img.col_offset = 0; +@@ -3301,6 +3308,14 @@ int TIFFReadRGBATileExt(TIFF *tif, uint32_t col, uint32_t row, uint32_t *raster, + return (0); + } + ++ if (col >= img.width || row >= img.height) ++ { ++ TIFFErrorExtR(tif, TIFFFileName(tif), ++ "Invalid row/col passed to TIFFReadRGBATile()."); ++ TIFFRGBAImageEnd(&img); ++ return (0); ++ } ++ + /* + * The TIFFRGBAImageGet() function doesn't allow us to get off the + * edge of the image, even to fill an otherwise valid tile. So we diff --git a/libtiff.spec b/libtiff.spec index a019caa..1fdbc73 100644 --- a/libtiff.spec +++ b/libtiff.spec @@ -1,7 +1,7 @@ Summary: Library of functions for manipulating TIFF format image files Name: libtiff Version: 4.6.0 -Release: 6%{?dist}.1 +Release: 6%{?dist}.2 License: libtiff URL: http://www.simplesystems.org/libtiff/ @@ -14,6 +14,9 @@ Patch0: libtiff-am-version.patch Patch1: libtiff-4.6.0-CVE-2024-7006.patch # Resolves: RHEL-112524 Patch2: RHEL-112524.patch +# from upstream, for <=4.6.0, RHEL-148254 +# https://gitlab.com/libtiff/libtiff/-/merge_requests/546.patch +Patch3: libtiff-4.6.0-CVE-2023-52356.patch BuildRequires: gcc, gcc-c++ BuildRequires: zlib-devel libjpeg-devel jbigkit-devel libzstd-devel libwebp-devel liblerc-devel @@ -67,6 +70,7 @@ image files using the libtiff library. %patch -P 0 -p1 -b .backup %patch -P 1 -p1 -b .CVE-2024-7006 %patch -P 2 -p1 -b .RHEL-112524 +%patch -P 3 -p1 -b .CVE-2023-52356 # Use build system's libtool.m4, not the one in the package. rm -f libtool.m4 @@ -165,6 +169,9 @@ LD_LIBRARY_PATH=$PWD:$LD_LIBRARY_PATH make check %{_mandir}/man1/* %changelog +* Wed Mar 11 2026 Michal Hlavinka - 4.6.0-6.2 +- fix CVE-2023-52356: libtiff could crash in TIFFReadRGBATileExt when parsing crafted tiff file (RHEL-148254) + * Wed Oct 08 2025 RHEL Packaging Agent - 4.6.0-6.1 - Fix buffer underflow in TIFFReadRGBAImageOriented(). - Resolves: RHEL-112524