diff options
| -rw-r--r-- | meta/recipes-multimedia/libtiff/tiff/CVE-2022-3970.patch | 38 | ||||
| -rw-r--r-- | meta/recipes-multimedia/libtiff/tiff_4.3.0.bb | 1 |
2 files changed, 39 insertions, 0 deletions
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 @@ | |||
| 1 | From 11c8026913e190b02266c1247e7a770e488d925e 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 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
| 11 | --- | ||
| 12 | libtiff/tif_getimage.c | 8 ++++---- | ||
| 13 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
| 14 | |||
| 15 | diff --git a/libtiff/tif_getimage.c b/libtiff/tif_getimage.c | ||
| 16 | index a1b6570b..9a2e0c59 100644 | ||
| 17 | --- a/libtiff/tif_getimage.c | ||
| 18 | +++ b/libtiff/tif_getimage.c | ||
| 19 | @@ -3058,15 +3058,15 @@ TIFFReadRGBATileExt(TIFF* tif, uint32_t col, uint32_t row, uint32_t * raster, in | ||
| 20 | return( ok ); | ||
| 21 | |||
| 22 | for( i_row = 0; i_row < read_ysize; i_row++ ) { | ||
| 23 | - memmove( raster + (tile_ysize - i_row - 1) * tile_xsize, | ||
| 24 | - raster + (read_ysize - i_row - 1) * read_xsize, | ||
| 25 | + memmove( raster + (size_t)(tile_ysize - i_row - 1) * tile_xsize, | ||
| 26 | + raster + (size_t)(read_ysize - i_row - 1) * read_xsize, | ||
| 27 | read_xsize * sizeof(uint32_t) ); | ||
| 28 | - _TIFFmemset( raster + (tile_ysize - i_row - 1) * tile_xsize+read_xsize, | ||
| 29 | + _TIFFmemset( raster + (size_t)(tile_ysize - i_row - 1) * tile_xsize+read_xsize, | ||
| 30 | 0, sizeof(uint32_t) * (tile_xsize - read_xsize) ); | ||
| 31 | } | ||
| 32 | |||
| 33 | for( i_row = read_ysize; i_row < tile_ysize; i_row++ ) { | ||
| 34 | - _TIFFmemset( raster + (tile_ysize - i_row - 1) * tile_xsize, | ||
| 35 | + _TIFFmemset( raster + (size_t)(tile_ysize - i_row - 1) * tile_xsize, | ||
| 36 | 0, sizeof(uint32_t) * tile_xsize ); | ||
| 37 | } | ||
| 38 | |||
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 \ | |||
| 27 | file://b258ed69a485a9cfb299d9f060eb2a46c54e5903.patch \ | 27 | file://b258ed69a485a9cfb299d9f060eb2a46c54e5903.patch \ |
| 28 | file://0001-tiffcrop-Fix-issue-330-and-some-more-from-320-to-349.patch \ | 28 | file://0001-tiffcrop-Fix-issue-330-and-some-more-from-320-to-349.patch \ |
| 29 | file://CVE-2022-2953.patch \ | 29 | file://CVE-2022-2953.patch \ |
| 30 | file://CVE-2022-3970.patch \ | ||
| 30 | file://0001-Revised-handling-of-TIFFTAG_INKNAMES-and-related-TIF.patch \ | 31 | file://0001-Revised-handling-of-TIFFTAG_INKNAMES-and-related-TIF.patch \ |
| 31 | file://0001-tiffcrop-S-option-Make-decision-simpler.patch \ | 32 | file://0001-tiffcrop-S-option-Make-decision-simpler.patch \ |
| 32 | file://0001-tiffcrop-disable-incompatibility-of-Z-X-Y-z-options-.patch \ | 33 | file://0001-tiffcrop-disable-incompatibility-of-Z-X-Y-z-options-.patch \ |
