diff options
| author | Qiu, Zheng <Zheng.Qiu@windriver.com> | 2022-11-25 13:09:39 -0500 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-12-07 15:02:50 +0000 |
| commit | 16f96f6e3f175f7c522a8948031f9cc17125bb31 (patch) | |
| tree | 312208812b76f7f673bbb4d36d2de72779caf180 | |
| parent | 5a0edf1b8c13dc89f9f465ffea4ed13a3c5bb5f5 (diff) | |
| download | poky-16f96f6e3f175f7c522a8948031f9cc17125bb31.tar.gz | |
tiff: Security fix for CVE-2022-3970
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
(From OE-Core rev: d066f7e8435491f53622d9d6b21f3650c22f8995)
Signed-off-by: Zheng Qiu <zheng.qiu@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
(cherry picked from commit 668ff495ac44e5b6d9e1af15d3861b5c2b4dfcd1)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-multimedia/libtiff/files/CVE-2022-3970.patch | 39 | ||||
| -rw-r--r-- | meta/recipes-multimedia/libtiff/tiff_4.4.0.bb | 1 |
2 files changed, 40 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/libtiff/files/CVE-2022-3970.patch b/meta/recipes-multimedia/libtiff/files/CVE-2022-3970.patch new file mode 100644 index 0000000000..b3352ba8ab --- /dev/null +++ b/meta/recipes-multimedia/libtiff/files/CVE-2022-3970.patch | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | From 227500897dfb07fb7d27f7aa570050e62617e3be Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Even Rouault <even.rouault@spatialys.com> | ||
| 3 | Date: Tue, 8 Nov 2022 15:16:58 +0100 | ||
| 4 | Subject: [PATCH] TIFFReadRGBATileExt(): fix (unsigned) integer overflow on | ||
| 5 | strips/tiles > 2 GB | ||
| 6 | |||
| 7 | Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53137 | ||
| 8 | Upstream-Status: Accepted | ||
| 9 | --- | ||
| 10 | libtiff/tif_getimage.c | 8 ++++---- | ||
| 11 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
| 12 | |||
| 13 | diff --git a/libtiff/tif_getimage.c b/libtiff/tif_getimage.c | ||
| 14 | index a4d0c1d6..60b94d8e 100644 | ||
| 15 | --- a/libtiff/tif_getimage.c | ||
| 16 | +++ b/libtiff/tif_getimage.c | ||
| 17 | @@ -3016,15 +3016,15 @@ TIFFReadRGBATileExt(TIFF* tif, uint32_t col, uint32_t row, uint32_t * raster, in | ||
| 18 | return( ok ); | ||
| 19 | |||
| 20 | for( i_row = 0; i_row < read_ysize; i_row++ ) { | ||
| 21 | - memmove( raster + (tile_ysize - i_row - 1) * tile_xsize, | ||
| 22 | - raster + (read_ysize - i_row - 1) * read_xsize, | ||
| 23 | + memmove( raster + (size_t)(tile_ysize - i_row - 1) * tile_xsize, | ||
| 24 | + raster + (size_t)(read_ysize - i_row - 1) * read_xsize, | ||
| 25 | read_xsize * sizeof(uint32_t) ); | ||
| 26 | - _TIFFmemset( raster + (tile_ysize - i_row - 1) * tile_xsize+read_xsize, | ||
| 27 | + _TIFFmemset( raster + (size_t)(tile_ysize - i_row - 1) * tile_xsize+read_xsize, | ||
| 28 | 0, sizeof(uint32_t) * (tile_xsize - read_xsize) ); | ||
| 29 | } | ||
| 30 | |||
| 31 | for( i_row = read_ysize; i_row < tile_ysize; i_row++ ) { | ||
| 32 | - _TIFFmemset( raster + (tile_ysize - i_row - 1) * tile_xsize, | ||
| 33 | + _TIFFmemset( raster + (size_t)(tile_ysize - i_row - 1) * tile_xsize, | ||
| 34 | 0, sizeof(uint32_t) * tile_xsize ); | ||
| 35 | } | ||
| 36 | |||
| 37 | -- | ||
| 38 | 2.33.0 | ||
| 39 | |||
diff --git a/meta/recipes-multimedia/libtiff/tiff_4.4.0.bb b/meta/recipes-multimedia/libtiff/tiff_4.4.0.bb index 29cb4111d6..970aab5433 100644 --- a/meta/recipes-multimedia/libtiff/tiff_4.4.0.bb +++ b/meta/recipes-multimedia/libtiff/tiff_4.4.0.bb | |||
| @@ -12,6 +12,7 @@ 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 \ | 13 | file://CVE-2022-34526.patch \ |
| 14 | file://CVE-2022-2953.patch \ | 14 | file://CVE-2022-2953.patch \ |
| 15 | file://CVE-2022-3970.patch \ | ||
| 15 | file://0001-Revised-handling-of-TIFFTAG_INKNAMES-and-related-TIF.patch \ | 16 | file://0001-Revised-handling-of-TIFFTAG_INKNAMES-and-related-TIF.patch \ |
| 16 | file://0001-tiffcrop-S-option-Make-decision-simpler.patch \ | 17 | file://0001-tiffcrop-S-option-Make-decision-simpler.patch \ |
| 17 | file://0001-tiffcrop-disable-incompatibility-of-Z-X-Y-z-options-.patch \ | 18 | file://0001-tiffcrop-disable-incompatibility-of-Z-X-Y-z-options-.patch \ |
