diff options
author | Yogita Urade <yogita.urade@windriver.com> | 2025-08-26 16:18:33 +0530 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2025-09-08 08:27:11 -0700 |
commit | 999a2e1aa450814e2f6a42c170a92dc62a08766a (patch) | |
tree | 188ad59da925a969c8d7f036375297361eb8f320 | |
parent | 41c69cd099735be8380ec5a6a9a72e30628e8099 (diff) | |
download | poky-999a2e1aa450814e2f6a42c170a92dc62a08766a.tar.gz |
tiff: fix CVE-2025-8534
A vulnerability classified as problematic was found in libtiff
4.6.0. This vulnerability affects the function PS_Lvl2page of
the file tools/tiff2ps.c of the component tiff2ps. The
manipulation leads to null pointer dereference. It is possible
to launch the attack on the local host. The complexity of an
attack is rather high. The exploitation appears to be difficult.
The exploit has been disclosed to the public and may be used.
The name of the patch is 6ba36f159fd396ad11bf6b7874554197736ecc8b.
It is recommended to apply a patch to fix this issue. One of the
maintainers explains, that "[t]his error only occurs if
DEFER_STRILE_LOAD (defer-strile-load:BOOL=ON) or TIFFOpen( .. "rD")
option is used."
Reference:
https://nvd.nist.gov/vuln/detail/CVE-2025-8534
Upstream patch:
https://gitlab.com/libtiff/libtiff/-/commit/6ba36f159fd396ad11bf6b7874554197736ecc8b
(From OE-Core rev: c897368cd363d3e50372ab1fc95bc31f1a883dc4)
Signed-off-by: Yogita Urade <yogita.urade@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r-- | meta/recipes-multimedia/libtiff/tiff/CVE-2025-8534.patch | 60 | ||||
-rw-r--r-- | meta/recipes-multimedia/libtiff/tiff_4.3.0.bb | 1 |
2 files changed, 61 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/libtiff/tiff/CVE-2025-8534.patch b/meta/recipes-multimedia/libtiff/tiff/CVE-2025-8534.patch new file mode 100644 index 0000000000..59c14e2703 --- /dev/null +++ b/meta/recipes-multimedia/libtiff/tiff/CVE-2025-8534.patch | |||
@@ -0,0 +1,60 @@ | |||
1 | From 6ba36f159fd396ad11bf6b7874554197736ecc8b Mon Sep 17 00:00:00 2001 | ||
2 | From: Su_Laus <sulau@freenet.de> | ||
3 | Date: Sat, 2 Aug 2025 18:55:54 +0200 | ||
4 | Subject: [PATCH] tiff2ps: check return of TIFFGetFiled() for | ||
5 | TIFFTAG_STRIPBYTECOUNTS and TIFFTAG_TILEBYTECOUNTS to avoid NULL pointer | ||
6 | dereference. | ||
7 | |||
8 | Closes #718 | ||
9 | |||
10 | CVE: CVE-2025-8534 | ||
11 | Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/commit/6ba36f159fd396ad11bf6b7874554197736ecc8b] | ||
12 | |||
13 | Signed-off-by: Yogita Urade <yogita.urade@windriver.com> | ||
14 | --- | ||
15 | tools/tiff2ps.c | 20 +++++++++++++++++--- | ||
16 | 1 file changed, 17 insertions(+), 3 deletions(-) | ||
17 | |||
18 | diff --git a/tools/tiff2ps.c b/tools/tiff2ps.c | ||
19 | index a598ede..05a346a 100644 | ||
20 | --- a/tools/tiff2ps.c | ||
21 | +++ b/tools/tiff2ps.c | ||
22 | @@ -2193,10 +2193,20 @@ PS_Lvl2page(FILE* fd, TIFF* tif, uint32_t w, uint32_t h) | ||
23 | tiled_image = TIFFIsTiled(tif); | ||
24 | if (tiled_image) { | ||
25 | num_chunks = TIFFNumberOfTiles(tif); | ||
26 | - TIFFGetField(tif, TIFFTAG_TILEBYTECOUNTS, &bc); | ||
27 | + if (!TIFFGetField(tif, TIFFTAG_TILEBYTECOUNTS, &bc)) | ||
28 | + { | ||
29 | + TIFFError(filename, | ||
30 | + "Can't read bytecounts of tiles at PS_Lvl2page()"); | ||
31 | + return (FALSE); | ||
32 | + } | ||
33 | } else { | ||
34 | num_chunks = TIFFNumberOfStrips(tif); | ||
35 | - TIFFGetField(tif, TIFFTAG_STRIPBYTECOUNTS, &bc); | ||
36 | + if (!TIFFGetField(tif, TIFFTAG_STRIPBYTECOUNTS, &bc)) | ||
37 | + { | ||
38 | + TIFFError(filename, | ||
39 | + "Can't read bytecounts of strips at PS_Lvl2page()"); | ||
40 | + return (FALSE); | ||
41 | + } | ||
42 | } | ||
43 | |||
44 | if (use_rawdata) { | ||
45 | @@ -2791,7 +2801,11 @@ PSRawDataBW(FILE* fd, TIFF* tif, uint32_t w, uint32_t h) | ||
46 | |||
47 | (void) w; (void) h; | ||
48 | TIFFGetFieldDefaulted(tif, TIFFTAG_FILLORDER, &fillorder); | ||
49 | - TIFFGetField(tif, TIFFTAG_STRIPBYTECOUNTS, &bc); | ||
50 | + if (!TIFFGetField(tif, TIFFTAG_STRIPBYTECOUNTS, &bc)) | ||
51 | + { | ||
52 | + TIFFError(filename, "Can't read bytecounts of strips at PSRawDataBW()"); | ||
53 | + return; | ||
54 | + } | ||
55 | |||
56 | /* | ||
57 | * Find largest strip: | ||
58 | -- | ||
59 | 2.40.0 | ||
60 | |||
diff --git a/meta/recipes-multimedia/libtiff/tiff_4.3.0.bb b/meta/recipes-multimedia/libtiff/tiff_4.3.0.bb index d5ae82bc7c..137dc7f478 100644 --- a/meta/recipes-multimedia/libtiff/tiff_4.3.0.bb +++ b/meta/recipes-multimedia/libtiff/tiff_4.3.0.bb | |||
@@ -60,6 +60,7 @@ SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \ | |||
60 | file://CVE-2025-8176-0003.patch \ | 60 | file://CVE-2025-8176-0003.patch \ |
61 | file://CVE-2025-8177.patch \ | 61 | file://CVE-2025-8177.patch \ |
62 | file://CVE-2024-13978.patch \ | 62 | file://CVE-2024-13978.patch \ |
63 | file://CVE-2025-8534.patch \ | ||
63 | " | 64 | " |
64 | 65 | ||
65 | SRC_URI[sha256sum] = "0e46e5acb087ce7d1ac53cf4f56a09b221537fc86dfc5daaad1c2e89e1b37ac8" | 66 | SRC_URI[sha256sum] = "0e46e5acb087ce7d1ac53cf4f56a09b221537fc86dfc5daaad1c2e89e1b37ac8" |