Skip to content

Commit 73951a6

Browse files
[AutoPR- Security] Patch libtiff for CVE-2024-13978 [LOW] (microsoft#14665)
1 parent 399992e commit 73951a6

File tree

2 files changed

+49
-1
lines changed

2 files changed

+49
-1
lines changed

SPECS/libtiff/CVE-2024-13978.patch

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
From c13d9af1d963fb9a98f241622dec80833977590b Mon Sep 17 00:00:00 2001
2+
From: Lee Howard <[email protected]>
3+
Date: Sat, 5 Oct 2024 09:45:30 -0700
4+
Subject: [PATCH] Check TIFFTAG_TILELENGTH and TIFFTAGTILEWIDTH for valid
5+
input, addresses issue #650
6+
7+
Signed-off-by: Azure Linux Security Servicing Account <[email protected]>
8+
Upstream-reference: https://gitlab.com/libtiff/libtiff/-/commit/2ebfffb0e8836bfb1cd7d85c059cd285c59761a4.patch
9+
---
10+
tools/unsupported/tiff2pdf.c | 16 ++++++++++++++++
11+
1 file changed, 16 insertions(+)
12+
13+
diff --git a/tools/unsupported/tiff2pdf.c b/tools/unsupported/tiff2pdf.c
14+
index 1dbdc87..9ab4a9b 100644
15+
--- a/tools/unsupported/tiff2pdf.c
16+
+++ b/tools/unsupported/tiff2pdf.c
17+
@@ -1337,8 +1337,24 @@ void t2p_read_tiff_init(T2P *t2p, TIFF *input)
18+
t2p->pdf_xrefcount += (t2p->tiff_tiles[i].tiles_tilecount - 1) * 2;
19+
TIFFGetField(input, TIFFTAG_TILEWIDTH,
20+
&(t2p->tiff_tiles[i].tiles_tilewidth));
21+
+ if (t2p->tiff_tiles[i].tiles_tilewidth < 1)
22+
+ {
23+
+ TIFFError(TIFF2PDF_MODULE, "Invalid tile width (%d), %s",
24+
+ t2p->tiff_tiles[i].tiles_tilewidth,
25+
+ TIFFFileName(input));
26+
+ t2p->t2p_error = T2P_ERR_ERROR;
27+
+ return;
28+
+ }
29+
TIFFGetField(input, TIFFTAG_TILELENGTH,
30+
&(t2p->tiff_tiles[i].tiles_tilelength));
31+
+ if (t2p->tiff_tiles[i].tiles_tilelength < 1)
32+
+ {
33+
+ TIFFError(TIFF2PDF_MODULE, "Invalid tile length (%d), %s",
34+
+ t2p->tiff_tiles[i].tiles_tilelength,
35+
+ TIFFFileName(input));
36+
+ t2p->t2p_error = T2P_ERR_ERROR;
37+
+ return;
38+
+ }
39+
t2p->tiff_tiles[i].tiles_tiles = (T2P_TILE *)_TIFFmalloc(
40+
TIFFSafeMultiply(tmsize_t, t2p->tiff_tiles[i].tiles_tilecount,
41+
sizeof(T2P_TILE)));
42+
--
43+
2.45.4
44+

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: Azure Linux
@@ -18,6 +18,7 @@ Patch6: CVE-2025-8177.patch
1818
Patch7: CVE-2025-8176.patch
1919
Patch8: CVE-2025-8851.patch
2020
Patch9: CVE-2025-9165.patch
21+
Patch10: CVE-2024-13978.patch
2122

2223
BuildRequires: autoconf
2324
BuildRequires: automake
@@ -74,6 +75,9 @@ make %{?_smp_mflags} -k check
7475
%exclude %{_docdir}/tiff-%{version}/LICENSE.md
7576

7677
%changelog
78+
* Fri Sep 12 2025 Azure Linux Security Servicing Account <[email protected]> - 4.6.0-9
79+
- Patch for CVE-2024-13978
80+
7781
* Thu Aug 21 2025 Azure Linux Security Servicing Account <[email protected]> - 4.6.0-8
7882
- Patch for CVE-2025-9165, CVE-2025-8851
7983

0 commit comments

Comments
 (0)