public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Steve Sakoman <steve@sakoman.com>
To: openembedded-core@lists.openembedded.org
Subject: [OE-core][kirkstone 04/23] tiff: Security fix for CVE-2022-3970
Date: Thu,  1 Dec 2022 04:26:58 -1000	[thread overview]
Message-ID: <d4b231e1baa0c4c6fa8eaa2e25170eeb29cd1cdf.1669904703.git.steve@sakoman.com> (raw)
In-Reply-To: <cover.1669904703.git.steve@sakoman.com>

From: "Qiu, Zheng" <Zheng.Qiu@windriver.com>

This patch contains a fix for CVE-2022-3970

Reference:
https://nvd.nist.gov/vuln/detail/CVE-2022-3970
https://security-tracker.debian.org/tracker/CVE-2022-3970

Patch generated from :
https://gitlab.com/libtiff/libtiff/-/commit/227500897dfb07fb7d27f7aa570050e62617e3be

Signed-off-by: Zheng Qiu <zheng.qiu@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
 .../libtiff/tiff/CVE-2022-3970.patch          | 38 +++++++++++++++++++
 meta/recipes-multimedia/libtiff/tiff_4.3.0.bb |  1 +
 2 files changed, 39 insertions(+)
 create mode 100644 meta/recipes-multimedia/libtiff/tiff/CVE-2022-3970.patch

diff --git a/meta/recipes-multimedia/libtiff/tiff/CVE-2022-3970.patch b/meta/recipes-multimedia/libtiff/tiff/CVE-2022-3970.patch
new file mode 100644
index 0000000000..3779ebf646
--- /dev/null
+++ b/meta/recipes-multimedia/libtiff/tiff/CVE-2022-3970.patch
@@ -0,0 +1,38 @@
+From 11c8026913e190b02266c1247e7a770e488d925e Mon Sep 17 00:00:00 2001
+From: Even Rouault <even.rouault@spatialys.com>
+Date: Tue, 8 Nov 2022 15:16:58 +0100
+Subject: [PATCH] TIFFReadRGBATileExt(): fix (unsigned) integer overflow on
+ strips/tiles > 2 GB
+
+Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53137
+Upstream-Status: Accepted
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ libtiff/tif_getimage.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/libtiff/tif_getimage.c b/libtiff/tif_getimage.c
+index a1b6570b..9a2e0c59 100644
+--- a/libtiff/tif_getimage.c
++++ b/libtiff/tif_getimage.c
+@@ -3058,15 +3058,15 @@ TIFFReadRGBATileExt(TIFF* tif, uint32_t col, uint32_t row, uint32_t * raster, in
+         return( ok );
+ 
+     for( i_row = 0; i_row < read_ysize; i_row++ ) {
+-        memmove( raster + (tile_ysize - i_row - 1) * tile_xsize,
+-                 raster + (read_ysize - i_row - 1) * read_xsize,
++        memmove( raster + (size_t)(tile_ysize - i_row - 1) * tile_xsize,
++                 raster + (size_t)(read_ysize - i_row - 1) * read_xsize,
+                  read_xsize * sizeof(uint32_t) );
+-        _TIFFmemset( raster + (tile_ysize - i_row - 1) * tile_xsize+read_xsize,
++        _TIFFmemset( raster + (size_t)(tile_ysize - i_row - 1) * tile_xsize+read_xsize,
+                      0, sizeof(uint32_t) * (tile_xsize - read_xsize) );
+     }
+ 
+     for( i_row = read_ysize; i_row < tile_ysize; i_row++ ) {
+-        _TIFFmemset( raster + (tile_ysize - i_row - 1) * tile_xsize,
++        _TIFFmemset( raster + (size_t)(tile_ysize - i_row - 1) * tile_xsize,
+                      0, sizeof(uint32_t) * tile_xsize );
+     }
+ 
diff --git a/meta/recipes-multimedia/libtiff/tiff_4.3.0.bb b/meta/recipes-multimedia/libtiff/tiff_4.3.0.bb
index af9bdcfbde..b3737f962e 100644
--- a/meta/recipes-multimedia/libtiff/tiff_4.3.0.bb
+++ b/meta/recipes-multimedia/libtiff/tiff_4.3.0.bb
@@ -27,6 +27,7 @@ SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \
            file://b258ed69a485a9cfb299d9f060eb2a46c54e5903.patch \
            file://0001-tiffcrop-Fix-issue-330-and-some-more-from-320-to-349.patch \
            file://CVE-2022-2953.patch \
+           file://CVE-2022-3970.patch \
            file://0001-Revised-handling-of-TIFFTAG_INKNAMES-and-related-TIF.patch \
            file://0001-tiffcrop-S-option-Make-decision-simpler.patch \
            file://0001-tiffcrop-disable-incompatibility-of-Z-X-Y-z-options-.patch \
-- 
2.25.1



  parent reply	other threads:[~2022-12-01 14:27 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-01 14:26 [OE-core][kirkstone 00/23] Patch review Steve Sakoman
2022-12-01 14:26 ` [OE-core][kirkstone 01/23] grub2: backport patch to fix CVE-2022-2601 CVE-2022-3775 Steve Sakoman
2022-12-01 14:26 ` [OE-core][kirkstone 02/23] tiff: refresh with devtool Steve Sakoman
2022-12-01 14:26 ` [OE-core][kirkstone 03/23] tiff: fix a number of CVEs Steve Sakoman
2022-12-01 14:26 ` Steve Sakoman [this message]
2022-12-01 14:26 ` [OE-core][kirkstone 05/23] tiff: add CVE tag to b258ed69a485a9cfb299d9f060eb2a46c54e5903.patch Steve Sakoman
2022-12-01 14:27 ` [OE-core][kirkstone 06/23] curl: Fix CVE-2022-32221 Steve Sakoman
2022-12-01 14:27 ` [OE-core][kirkstone 07/23] curl: Fix CVE-2022-42916 Steve Sakoman
2022-12-01 14:27 ` [OE-core][kirkstone 08/23] curl: Fix CVE-2022-42915 Steve Sakoman
2022-12-01 14:27 ` [OE-core][kirkstone 09/23] dropbear: fix CVE-2021-36369 Steve Sakoman
2022-12-01 14:27 ` [OE-core][kirkstone 10/23] libpam: fix CVE-2022-28321 Steve Sakoman
2022-12-01 14:27 ` [OE-core][kirkstone 11/23] dbus: upgrade 1.14.0 -> 1.14.4 Steve Sakoman
2022-12-01 14:27 ` [OE-core][kirkstone 12/23] linux-yocto/5.15: update to v5.15.74 Steve Sakoman
2022-12-01 14:27 ` [OE-core][kirkstone 13/23] linux-yocto/5.15: update to v5.15.76 Steve Sakoman
2022-12-01 14:27 ` [OE-core][kirkstone 14/23] linux-yocto/5.15: update to v5.15.78 Steve Sakoman
2022-12-01 14:27 ` [OE-core][kirkstone 15/23] linux-yocto/5.15: fix CONFIG_CRYPTO_CCM mismatch warnings Steve Sakoman
2022-12-01 14:27 ` [OE-core][kirkstone 16/23] kern-tools: integrate ZFS speedup patch Steve Sakoman
2022-12-01 14:27 ` [OE-core][kirkstone 17/23] kernel.bbclass: make KERNEL_DEBUG_TIMESTAMPS work at rebuild Steve Sakoman
2022-12-01 14:27 ` [OE-core][kirkstone 18/23] linux-firmware: upgrade 20221012 -> 20221109 Steve Sakoman
2022-12-01 14:27 ` [OE-core][kirkstone 19/23] linux-firmware: add new fw file to ${PN}-qcom-adreno-a530 Steve Sakoman
2022-12-01 14:27 ` [OE-core][kirkstone 20/23] sstatesig: emit more helpful error message when not finding sstate manifest Steve Sakoman
2022-12-01 14:27 ` [OE-core][kirkstone 21/23] resolvconf: make it work Steve Sakoman
2022-12-01 14:27 ` [OE-core][kirkstone 22/23] dhcpcd: fix to work with systemd Steve Sakoman
2022-12-01 14:27 ` [OE-core][kirkstone 23/23] mirrors.bbclass: update CPAN_MIRROR Steve Sakoman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d4b231e1baa0c4c6fa8eaa2e25170eeb29cd1cdf.1669904703.git.steve@sakoman.com \
    --to=steve@sakoman.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox