From 842cc30709de2dcd4a367d2191d135c6dce5e882 Mon Sep 17 00:00:00 2001 From: yangxinyu Date: Wed, 10 Sep 2025 13:20:24 +0800 Subject: [PATCH] [CVE] fix cve-2025-9165 to #bug24098 fix cve-2025-9165 Project: TC2024080204 Signed-off-by:yangxinyu --- libtiff-4.6.0-cve-2025-9165.patch | 28 ++++++++++++++++++++++++++++ libtiff.spec | 8 +++++++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 libtiff-4.6.0-cve-2025-9165.patch diff --git a/libtiff-4.6.0-cve-2025-9165.patch b/libtiff-4.6.0-cve-2025-9165.patch new file mode 100644 index 0000000..734ce07 --- /dev/null +++ b/libtiff-4.6.0-cve-2025-9165.patch @@ -0,0 +1,28 @@ +From ed141286a37f6e5ddafb5069347ff5d587e7a4e0 Mon Sep 17 00:00:00 2001 +From: Su_Laus +Date: Fri, 8 Aug 2025 21:35:30 +0200 +Subject: [PATCH] tiffcmp: fix memory leak when second file cannot be opened. + +Closes #728, #729 +--- + tools/tiffcmp.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/tools/tiffcmp.c b/tools/tiffcmp.c +index 529c1cdc7..88d9470f5 100644 +--- a/tools/tiffcmp.c ++++ b/tools/tiffcmp.c +@@ -105,7 +105,10 @@ int main(int argc, char *argv[]) + return (2); + tif2 = TIFFOpen(argv[optind + 1], "r"); + if (tif2 == NULL) ++ { ++ TIFFClose(tif1); + return (2); ++ } + dirnum = 0; + while (tiffcmp(tif1, tif2)) + { +-- +GitLab + diff --git a/libtiff.spec b/libtiff.spec index 1034ecc..2e41b4f 100644 --- a/libtiff.spec +++ b/libtiff.spec @@ -1,4 +1,4 @@ -%define anolis_release 3 +%define anolis_release 4 Summary: Library of functions for manipulating TIFF format image files Name: libtiff Version: 4.6.0 @@ -27,6 +27,9 @@ Patch3: Fix-CVE-2023-52356.patch # https://gitlab.com/libtiff/libtiff/-/merge_requests/746 Patch4: backport-fix-CVE-2025-8534.patch +#https://gitlab.com/libtiff/libtiff/-/commit/ed141286a37f6e5ddafb5069347ff5d587e7a4e0 +Patch5: libtiff-4.6.0-cve-2025-9165.patch + %description The libtiff package contains a library of functions for manipulating TIFF (Tagged Image File Format) image format files. TIFF is a widely @@ -129,6 +132,9 @@ rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/ %{_mandir}/man1/tiffsplit.1* %changelog +* Wed Sep 10 2025 yangxinyu - 4.6.0-4 +- Add patch to fix CVE-2025-9165 + * Wed Aug 13 2025 wenxin - 4.6.0-3 - Add patch to fix CVE-2025-8534 -- Gitee