mirror of
https://git.yoctoproject.org/poky
synced 2026-09-15 15:49:32 +02:00
Add patches to fix below CVE issues CVE-2022-0865 CVE-2022-0907 CVE-2022-0908 CVE-2022-0909 CVE-2022-0924 (From OE-Core rev: 7c71434832caf6a15f8fb884d028a8c1bf4090a9) Signed-off-by: Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com> Signed-off-by: Ranjitsinh Rathod <ranjitsinhrathod1991@gmail.com> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
40 lines
1.4 KiB
Diff
40 lines
1.4 KiB
Diff
From a1c933dabd0e1c54a412f3f84ae0aa58115c6067 Mon Sep 17 00:00:00 2001
|
|
From: Even Rouault <even.rouault@spatialys.com>
|
|
Date: Thu, 24 Feb 2022 22:26:02 +0100
|
|
Subject: [PATCH] tif_jbig.c: fix crash when reading a file with multiple IFD
|
|
in memory-mapped mode and when bit reversal is needed (fixes #385)
|
|
|
|
CVE: CVE-2022-0865
|
|
Upstream-Status: Backport [https://sources.debian.org/src/tiff/4.1.0+git191117-2%7Edeb10u4/debian/patches/CVE-2022-0865.patch/]
|
|
Signed-off-by: Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com>
|
|
Comment: No change in any hunk
|
|
|
|
---
|
|
libtiff/tif_jbig.c | 10 ++++++++++
|
|
1 file changed, 10 insertions(+)
|
|
|
|
diff --git a/libtiff/tif_jbig.c b/libtiff/tif_jbig.c
|
|
index 74086338..8bfa4cef 100644
|
|
--- a/libtiff/tif_jbig.c
|
|
+++ b/libtiff/tif_jbig.c
|
|
@@ -208,6 +208,16 @@ int TIFFInitJBIG(TIFF* tif, int scheme)
|
|
*/
|
|
tif->tif_flags |= TIFF_NOBITREV;
|
|
tif->tif_flags &= ~TIFF_MAPPED;
|
|
+ /* We may have read from a previous IFD and thus set TIFF_BUFFERMMAP and
|
|
+ * cleared TIFF_MYBUFFER. It is necessary to restore them to their initial
|
|
+ * value to be consistent with the state of a non-memory mapped file.
|
|
+ */
|
|
+ if (tif->tif_flags&TIFF_BUFFERMMAP) {
|
|
+ tif->tif_rawdata = NULL;
|
|
+ tif->tif_rawdatasize = 0;
|
|
+ tif->tif_flags &= ~TIFF_BUFFERMMAP;
|
|
+ tif->tif_flags |= TIFF_MYBUFFER;
|
|
+ }
|
|
|
|
/* Setup the function pointers for encode, decode, and cleanup. */
|
|
tif->tif_setupdecode = JBIGSetupDecode;
|
|
--
|
|
GitLab
|
|
|