diff options
| author | Siddharth Doshi <sdoshi@mvista.com> | 2025-08-22 20:44:50 +0530 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-08-25 17:47:21 +0100 |
| commit | d566c7bb8d27e073d7977d21e34b763c7af3fcb1 (patch) | |
| tree | 0a889a905a121b28927a67d3934d41adebe92703 /meta/recipes-multimedia/libtiff/tiff/CVE-2024-13978_2.patch | |
| parent | 8f2adecb3acd924b385778b43e0a967c3e3f5946 (diff) | |
| download | poky-d566c7bb8d27e073d7977d21e34b763c7af3fcb1.tar.gz | |
tiff: Security fix for CVE-2024-13978, CVE-2025-8176, CVE-2025-8177
Upstream-Status: Backport from [https://gitlab.com/libtiff/libtiff/-/commit/7be20ccaab97455f192de0ac561ceda7cd9e12d1, https://gitlab.com/libtiff/libtiff/-/commit/2ebfffb0e8836bfb1cd7d85c059cd285c59761a4, https://gitlab.com/libtiff/libtiff/-/commit/3994cf3b3bc6b54c32f240ca5a412cffa11633fa, https://gitlab.com/libtiff/libtiff/-/commit/ce46f002eca4148497363f80fab33f9396bcbeda, https://gitlab.com/libtiff/libtiff/-/commit/ecc4ddbf1f0fed7957d1e20361e37f01907898e0, https://gitlab.com/libtiff/libtiff/-/commit/75d8eca6f106c01aadf76b8500a7d062b12f2d82, https://gitlab.com/libtiff/libtiff/-/commit/e8c9d6c616b19438695fd829e58ae4fde5bfbc22]
CVE's Fixed:
CVE-2024-13978 libtiff: LibTIFF Null Pointer Dereference
CVE-2025-8176 libtiff: LibTIFF Use-After-Free Vulnerability
CVE-2025-8177 libtiff: LibTIFF Buffer Overflow
(From OE-Core rev: 16d8a873c57b174e4d6581b58d890f2157aa2f2c)
Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-multimedia/libtiff/tiff/CVE-2024-13978_2.patch')
| -rw-r--r-- | meta/recipes-multimedia/libtiff/tiff/CVE-2024-13978_2.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/libtiff/tiff/CVE-2024-13978_2.patch b/meta/recipes-multimedia/libtiff/tiff/CVE-2024-13978_2.patch new file mode 100644 index 0000000000..a022fd41e2 --- /dev/null +++ b/meta/recipes-multimedia/libtiff/tiff/CVE-2024-13978_2.patch | |||
| @@ -0,0 +1,45 @@ | |||
| 1 | From a80b9eb70a8137e2571b2f32bd05d1a22a5603c4 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Lee Howard <faxguy@howardsilvan.com> | ||
| 3 | Date: Sat, 5 Oct 2024 09:45:30 -0700 | ||
| 4 | Subject: [PATCH 2/7] Check TIFFTAG_TILELENGTH and TIFFTAGTILEWIDTH for valid | ||
| 5 | input, addresses issue #650 | ||
| 6 | |||
| 7 | CVE: CVE-2024-13978 | ||
| 8 | Upstream-Status: Backport from [https://gitlab.com/libtiff/libtiff/-/commit/2ebfffb0e8836bfb1cd7d85c059cd285c59761a4] | ||
| 9 | Signed-off-by: Siddharth Doshi <sdoshi@mvista.com> | ||
| 10 | --- | ||
| 11 | tools/tiff2pdf.c | 16 ++++++++++++++++ | ||
| 12 | 1 file changed, 16 insertions(+) | ||
| 13 | |||
| 14 | diff --git a/tools/tiff2pdf.c b/tools/tiff2pdf.c | ||
| 15 | index 6dfc239..2010fee 100644 | ||
| 16 | --- a/tools/tiff2pdf.c | ||
| 17 | +++ b/tools/tiff2pdf.c | ||
| 18 | @@ -1371,8 +1371,24 @@ void t2p_read_tiff_init(T2P *t2p, TIFF *input) | ||
| 19 | t2p->pdf_xrefcount += (t2p->tiff_tiles[i].tiles_tilecount - 1) * 2; | ||
| 20 | TIFFGetField(input, TIFFTAG_TILEWIDTH, | ||
| 21 | &(t2p->tiff_tiles[i].tiles_tilewidth)); | ||
| 22 | + if (t2p->tiff_tiles[i].tiles_tilewidth < 1) | ||
| 23 | + { | ||
| 24 | + TIFFError(TIFF2PDF_MODULE, "Invalid tile width (%d), %s", | ||
| 25 | + t2p->tiff_tiles[i].tiles_tilewidth, | ||
| 26 | + TIFFFileName(input)); | ||
| 27 | + t2p->t2p_error = T2P_ERR_ERROR; | ||
| 28 | + return; | ||
| 29 | + } | ||
| 30 | TIFFGetField(input, TIFFTAG_TILELENGTH, | ||
| 31 | &(t2p->tiff_tiles[i].tiles_tilelength)); | ||
| 32 | + if (t2p->tiff_tiles[i].tiles_tilelength < 1) | ||
| 33 | + { | ||
| 34 | + TIFFError(TIFF2PDF_MODULE, "Invalid tile length (%d), %s", | ||
| 35 | + t2p->tiff_tiles[i].tiles_tilelength, | ||
| 36 | + TIFFFileName(input)); | ||
| 37 | + t2p->t2p_error = T2P_ERR_ERROR; | ||
| 38 | + return; | ||
| 39 | + } | ||
| 40 | t2p->tiff_tiles[i].tiles_tiles = (T2P_TILE *)_TIFFmalloc( | ||
| 41 | TIFFSafeMultiply(tmsize_t, t2p->tiff_tiles[i].tiles_tilecount, | ||
| 42 | sizeof(T2P_TILE))); | ||
| 43 | -- | ||
| 44 | 2.47.3 | ||
| 45 | |||
