Signed-off-by: Khem Raj <[email protected]>
---
 .../libtiff/files/CVE-2022-34526.patch        | 32 +++++++++++++++++++
 meta/recipes-multimedia/libtiff/tiff_4.4.0.bb |  4 ++-
 2 files changed, 35 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2022-34526.patch

diff --git a/meta/recipes-multimedia/libtiff/files/CVE-2022-34526.patch 
b/meta/recipes-multimedia/libtiff/files/CVE-2022-34526.patch
new file mode 100644
index 00000000000..54c33457468
--- /dev/null
+++ b/meta/recipes-multimedia/libtiff/files/CVE-2022-34526.patch
@@ -0,0 +1,32 @@
+From 275735d0354e39c0ac1dc3c0db2120d6f31d1990 Mon Sep 17 00:00:00 2001
+From: Even Rouault <[email protected]>
+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 <[email protected]>
+---
+ 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
+
diff --git a/meta/recipes-multimedia/libtiff/tiff_4.4.0.bb 
b/meta/recipes-multimedia/libtiff/tiff_4.4.0.bb
index 0af956a8f0f..e30df0b3e9e 100644
--- a/meta/recipes-multimedia/libtiff/tiff_4.4.0.bb
+++ b/meta/recipes-multimedia/libtiff/tiff_4.4.0.bb
@@ -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"
 
-- 
2.37.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#169336): 
https://lists.openembedded.org/g/openembedded-core/message/169336
Mute This Topic: https://lists.openembedded.org/mt/93025236/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to