mirror of
https://git.yoctoproject.org/poky
synced 2026-05-07 16:59:22 +00:00
tiff: Backport a patch for CVE-2022-34526
(From OE-Core rev: ade918f1e904ecab2c74358ca874c6b9594de2f0) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
From 275735d0354e39c0ac1dc3c0db2120d6f31d1990 Mon Sep 17 00:00:00 2001
|
||||
From: Even Rouault <even.rouault@spatialys.com>
|
||||
Date: Mon, 27 Jun 2022 16:09:43 +0200
|
||||
Subject: [PATCH] _TIFFCheckFieldIsValidForCodec(): return FALSE when passed a
|
||||
codec-specific tag and the codec is not configured (fixes #433)
|
||||
|
||||
This avoids crashes when querying such tags
|
||||
|
||||
CVE: CVE-2022-34526
|
||||
Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/commit/275735d0354e39c0ac1dc3c0db2120d6f31d1990]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
libtiff/tif_dirinfo.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/libtiff/tif_dirinfo.c b/libtiff/tif_dirinfo.c
|
||||
index c30f569b..3371cb5c 100644
|
||||
--- a/libtiff/tif_dirinfo.c
|
||||
+++ b/libtiff/tif_dirinfo.c
|
||||
@@ -1191,6 +1191,9 @@ _TIFFCheckFieldIsValidForCodec(TIFF *tif, ttag_t tag)
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
+ if( !TIFFIsCODECConfigured(tif->tif_dir.td_compression) ) {
|
||||
+ return 0;
|
||||
+ }
|
||||
/* Check if codec specific tags are allowed for the current
|
||||
* compression scheme (codec) */
|
||||
switch (tif->tif_dir.td_compression) {
|
||||
--
|
||||
GitLab
|
||||
|
||||
@@ -9,7 +9,9 @@ LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=34da3db46fab7501992f9615d7e158cf"
|
||||
CVE_PRODUCT = "libtiff"
|
||||
|
||||
SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \
|
||||
file://0001-fix-the-FPE-in-tiffcrop-415-427-and-428.patch"
|
||||
file://0001-fix-the-FPE-in-tiffcrop-415-427-and-428.patch \
|
||||
file://CVE-2022-34526.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "917223b37538959aca3b790d2d73aa6e626b688e02dcda272aec24c2f498abed"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user