Skip to content

Commit 5bd229a

Browse files
[AUTO-CHERRYPICK] Fix CVE-2023-3164 in libtiff for 2.0 - branch main (#12486)
Co-authored-by: bhagyapathak <bhagyapathak@users.noreply.github.com>
1 parent c6ae0cf commit 5bd229a

2 files changed

Lines changed: 35 additions & 1 deletion

File tree

SPECS/libtiff/CVE-2023-3164.patch

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
From 7ec6f53745ab6331382e59373ffd980b38a378f0 Mon Sep 17 00:00:00 2001
2+
From: Lee Howard <faxguy@howardsilvan.com>
3+
Date: Wed, 13 Mar 2024 10:06:21 -0700
4+
Subject: [PATCH] fix tiffcrop issues #552, #550, and #542
5+
6+
---
7+
archive/tools/tiffcrop.c | 8 ++++++++
8+
1 file changed, 8 insertions(+)
9+
10+
diff --git a/archive/tools/tiffcrop.c b/archive/tools/tiffcrop.c
11+
index 95983479c..3d837d269 100644
12+
--- a/archive/tools/tiffcrop.c
13+
+++ b/archive/tools/tiffcrop.c
14+
@@ -7766,6 +7766,14 @@ static int extractImageSection(struct image_data *image,
15+
(sect_width * spp * bps) %
16+
8; /* trailing bits within the last byte of destination buffer */
17+
18+
+ /* Check to make sure that we've got enough buffer.
19+
+ */
20+
+ if ((last_row - first_row) * img_rowsize > full_bytes)
21+
+ {
22+
+ printf("The source image data is too small.\n");
23+
+ return(-1);
24+
+ }
25+
+
26+
#ifdef DEVELMODE
27+
TIFFError("",
28+
"First row: %" PRIu32 ", last row: %" PRIu32
29+
--
30+

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: 4%{?dist}
4+
Release: 5%{?dist}
55
License: libtiff
66
Vendor: Microsoft Corporation
77
Distribution: Mariner
@@ -11,6 +11,7 @@ Source0: https://gitlab.com/libtiff/libtiff/-/archive/v%{version}/libtiff
1111
Patch0: CVE-2023-52356.patch
1212
Patch1: CVE-2024-7006.patch
1313
Patch2: CVE-2023-6277.patch
14+
Patch3: CVE-2023-3164.patch
1415
BuildRequires: autoconf
1516
BuildRequires: automake
1617
BuildRequires: libjpeg-turbo-devel
@@ -63,6 +64,9 @@ make %{?_smp_mflags} -k check
6364
%{_docdir}/*
6465

6566
%changelog
67+
* Thu Jan 16 2025 Bhagyashri Pathak <bhapathak@microsoft.com> - 4.6.0-5
68+
- Add patch to resolve CVE-2023-3164
69+
6670
* Mon Aug 19 2024 Sumedh Sharma <sumsharma@microsoft.com> - 4.6.0-4
6771
- Add patch to resolve CVE-2023-6277
6872

0 commit comments

Comments
 (0)