diff options
-rw-r--r-- | meta/recipes-multimedia/libtiff/files/CVE-2022-34526.patch | 32 | ||||
-rw-r--r-- | meta/recipes-multimedia/libtiff/tiff_4.4.0.bb | 4 |
2 files changed, 35 insertions, 1 deletions
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 0000000000..54c3345746 --- /dev/null +++ b/meta/recipes-multimedia/libtiff/files/CVE-2022-34526.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From 275735d0354e39c0ac1dc3c0db2120d6f31d1990 Mon Sep 17 00:00:00 2001 | ||
2 | From: Even Rouault <even.rouault@spatialys.com> | ||
3 | Date: Mon, 27 Jun 2022 16:09:43 +0200 | ||
4 | Subject: [PATCH] _TIFFCheckFieldIsValidForCodec(): return FALSE when passed a | ||
5 | codec-specific tag and the codec is not configured (fixes #433) | ||
6 | |||
7 | This avoids crashes when querying such tags | ||
8 | |||
9 | CVE: CVE-2022-34526 | ||
10 | Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/commit/275735d0354e39c0ac1dc3c0db2120d6f31d1990] | ||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | libtiff/tif_dirinfo.c | 3 +++ | ||
14 | 1 file changed, 3 insertions(+) | ||
15 | |||
16 | diff --git a/libtiff/tif_dirinfo.c b/libtiff/tif_dirinfo.c | ||
17 | index c30f569b..3371cb5c 100644 | ||
18 | --- a/libtiff/tif_dirinfo.c | ||
19 | +++ b/libtiff/tif_dirinfo.c | ||
20 | @@ -1191,6 +1191,9 @@ _TIFFCheckFieldIsValidForCodec(TIFF *tif, ttag_t tag) | ||
21 | default: | ||
22 | return 1; | ||
23 | } | ||
24 | + if( !TIFFIsCODECConfigured(tif->tif_dir.td_compression) ) { | ||
25 | + return 0; | ||
26 | + } | ||
27 | /* Check if codec specific tags are allowed for the current | ||
28 | * compression scheme (codec) */ | ||
29 | switch (tif->tif_dir.td_compression) { | ||
30 | -- | ||
31 | GitLab | ||
32 | |||
diff --git a/meta/recipes-multimedia/libtiff/tiff_4.4.0.bb b/meta/recipes-multimedia/libtiff/tiff_4.4.0.bb index 0af956a8f0..e30df0b3e9 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" | |||
9 | CVE_PRODUCT = "libtiff" | 9 | CVE_PRODUCT = "libtiff" |
10 | 10 | ||
11 | SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \ | 11 | SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \ |
12 | file://0001-fix-the-FPE-in-tiffcrop-415-427-and-428.patch" | 12 | file://0001-fix-the-FPE-in-tiffcrop-415-427-and-428.patch \ |
13 | file://CVE-2022-34526.patch \ | ||
14 | " | ||
13 | 15 | ||
14 | SRC_URI[sha256sum] = "917223b37538959aca3b790d2d73aa6e626b688e02dcda272aec24c2f498abed" | 16 | SRC_URI[sha256sum] = "917223b37538959aca3b790d2d73aa6e626b688e02dcda272aec24c2f498abed" |
15 | 17 | ||