Patch review
cover Patch review
Please review this set of changes for scarthgap and have comments back by end of day Tuesday, October 7
Passed a-full on autobuilder:
https://autobuilder.yoctoproject.org/valkyrie/#/builders/29/builds/2495
The following changes since commit 55e0c38dc28b73fa689446e2d5e564d235a24084:
vim: upgrade 9.1.1652 -> 9.1.1683 (2025-09-29 13:04:14 -0700)
are available in the Git repository at:
https://git.openembedded.org/openembedded-core-contrib stable/scarthgap-nut
https://git.openembedded.org/openembedded-core-contrib/log/?h=stable/scarthgap-nut
Adrian Freihofer (2):
expect: Revert "expect-native: fix do_compile failure with gcc-14"
expect: fix native build with GCC 15
Khem Raj (1):
expect: Fix build with GCC 15
Ross Burton (3):
expect: update code for Tcl channel implementation
expect: don't run aclocal in do_configure
expect: cleanup do_install
Vijay Anusuri (1):
gstreamer1.0-plugins-bad: Fix CVE-2025-3887
Yogita Urade (1):
tiff: fix CVE-2025-9900
.../expect/expect/tcl840.patch | 27 ++++++ meta/recipes-devtools/expect/expect_5.45.4.bb | 18 ++-- .../CVE-2025-3887-1.patch | 50 ++++++++++ .../CVE-2025-3887-2.patch | 95 +++++++++++++++++++ .../gstreamer1.0-plugins-bad_1.22.12.bb | 2 + .../libtiff/tiff/CVE-2025-9900.patch | 54 +++++++++++ meta/recipes-multimedia/libtiff/tiff_4.6.0.bb | 1 + 7 files changed, 237 insertions(+), 10 deletions(-) create mode 100644 meta/recipes-devtools/expect/expect/tcl840.patch create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/CVE-2025-3887-1.patch create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/CVE-2025-3887-2.patch create mode 100644 meta/recipes-multimedia/libtiff/tiff/CVE-2025-9900.patch
Signature · 1 line
2.43.0
PATCH 1/8 tiff: fix CVE-2025-9900
From: Yogita Urade <[email protected]>
A flaw was found in Libtiff. This vulnerability is a "write-what-where" condition, triggered when the library processes a specially crafted TIFF image file.[EOL][EOL]By providing an abnormally large image height value in the file's metadata, an attacker can trick the library into writing attacker-controlled color data to an arbitrary memory location. This memory corruption can be exploited to cause a denial of service (application crash) or to achieve arbitrary code execution with the permissions of the user.
Reference:
https://nvd.nist.gov/vuln/detail/CVE-2025-9900
Upstream patch:
https://gitlab.com/libtiff/libtiff/-/commit/3e0dcf0ec651638b2bd849b2e6f3124b36890d99
--- .../libtiff/tiff/CVE-2025-9900.patch | 54 +++++++++++++++++++ meta/recipes-multimedia/libtiff/tiff_4.6.0.bb | 1 + 2 files changed, 55 insertions(+) create mode 100644 meta/recipes-multimedia/libtiff/tiff/CVE-2025-9900.patch
meta/recipes-multimedia/libtiff/tiff/CVE-2025-9900.patch new file +54 -0
@@ -0,0 +1,54 @@ +From 3e0dcf0ec651638b2bd849b2e6f3124b36890d99 Mon Sep 17 00:00:00 2001 +From: Su Laus <[email protected]> +Date: Wed, 11 Jun 2025 19:45:19 +0000 +Subject: [PATCH] tif_getimage.c: Fix buffer underflow crash for less raster + rows at TIFFReadRGBAImageOriented() + +CVE: CVE-2025-9900 +Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/commit/3e0dcf0ec651638b2bd849b2e6f3124b36890d99] + +Signed-off-by: Yogita Urade <[email protected]> +--- + libtiff/tif_getimage.c | 20 +++++++++++++++++--- + 1 file changed, 17 insertions(+), 3 deletions(-) + +diff --git a/libtiff/tif_getimage.c b/libtiff/tif_getimage.c +index 3c9fc4f..fc8b22e 100644 +--- a/libtiff/tif_getimage.c ++++ b/libtiff/tif_getimage.c +@@ -600,6 +600,22 @@ int TIFFRGBAImageGet(TIFFRGBAImage *img, uint32_t *raster, uint32_t w, + "No \"put\" routine setupl; probably can not handle image format"); + return (0); + } ++ /* Verify raster width and height against image width and height. */ ++ if (h > img->height) ++ { ++ /* Adapt parameters to read only available lines and put image at ++ * the bottom of the raster. */ ++ raster += (size_t)(h - img->height) * w; ++ h = img->height; ++ } ++ if (w > img->width) ++ { ++ TIFFWarningExtR(img->tif, TIFFFileName(img->tif), ++ "Raster width of %d shall not be larger than image " ++ "width of %d -> raster width adapted for reading", ++ w, img->width); ++ w = img->width; ++ } + return (*img->get)(img, raster, w, h); + } + +@@ -617,9 +633,7 @@ int TIFFReadRGBAImageOriented(TIFF *tif, uint32_t rwidth, uint32_t rheight, + if (TIFFRGBAImageOK(tif, emsg) && TIFFRGBAImageBegin(&img, tif, stop, emsg)) + { + img.req_orientation = (uint16_t)orientation; +- /* XXX verify rwidth and rheight against width and height */ +- ok = TIFFRGBAImageGet(&img, raster + (rheight - img.height) * rwidth, +- rwidth, img.height); ++ ok = TIFFRGBAImageGet(&img, raster, rwidth, rheight); + TIFFRGBAImageEnd(&img); + } + else +-- +2.40.0
meta/recipes-multimedia/libtiff/tiff_4.6.0.bb +1 -0
@@ -17,6 +17,7 @@ SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \ file://CVE-2023-52355-0002.patch \ file://CVE-2023-52356.patch \ file://CVE-2024-7006.patch \ + file://CVE-2025-9900.patch \ " SRC_URI[sha256sum] = "88b3979e6d5c7e32b50d7ec72fb15af724f6ab2cbf7e10880c360a77e4b5d99a"
Signature · 1 line
2.43.0
PATCH 2/8 gstreamer1.0-plugins-bad: Fix CVE-2025-3887
In reply to Steve SakomanFrom: Vijay Anusuri <[email protected]>
Upstream-Status: Backport from
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/5463f0e09768ca90aa8c58357c1f4c645db580db
& https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/bcaab3609805ea10fb3d9ac0c9d947b4c3563948
--- .../CVE-2025-3887-1.patch | 50 ++++++++++ .../CVE-2025-3887-2.patch | 95 +++++++++++++++++++ .../gstreamer1.0-plugins-bad_1.22.12.bb | 2 + 3 files changed, 147 insertions(+) create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/CVE-2025-3887-1.patch create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/CVE-2025-3887-2.patch
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/CVE-2025-3887-1.patch new file +50 -0
@@ -0,0 +1,50 @@ +From 5463f0e09768ca90aa8c58357c1f4c645db580db Mon Sep 17 00:00:00 2001 +From: Seungha Yang <[email protected]> +Date: Sat, 15 Mar 2025 22:39:44 +0900 +Subject: [PATCH] h265parser: Fix max_dec_pic_buffering_minus1 bound check + +Allowed max value is MaxDpbSize - 1 + +Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8885> + +Upstream-Status: Backport [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/5463f0e09768ca90aa8c58357c1f4c645db580db] +CVE: CVE-2025-3887 +Signed-off-by: Vijay Anusuri <[email protected]> +--- + gst-libs/gst/codecparsers/gsth265parser.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/gst-libs/gst/codecparsers/gsth265parser.c b/gst-libs/gst/codecparsers/gsth265parser.c +index 44b7237..5d5a2db 100644 +--- a/gst-libs/gst/codecparsers/gsth265parser.c ++++ b/gst-libs/gst/codecparsers/gsth265parser.c +@@ -72,6 +72,8 @@ + #include <string.h> + #include <math.h> + ++#define MAX_DPB_SIZE 16 ++ + #ifndef GST_DISABLE_GST_DEBUG + #define GST_CAT_DEFAULT gst_h265_debug_category_get() + static GstDebugCategory * +@@ -1861,7 +1863,7 @@ gst_h265_parse_vps (GstH265NalUnit * nalu, GstH265VPS * vps) + for (i = + (vps->sub_layer_ordering_info_present_flag ? 0 : + vps->max_sub_layers_minus1); i <= vps->max_sub_layers_minus1; i++) { +- READ_UE_MAX (&nr, vps->max_dec_pic_buffering_minus1[i], G_MAXUINT32 - 1); ++ READ_UE_MAX (&nr, vps->max_dec_pic_buffering_minus1[i], MAX_DPB_SIZE - 1); + READ_UE_MAX (&nr, vps->max_num_reorder_pics[i], + vps->max_dec_pic_buffering_minus1[i]); + READ_UE_MAX (&nr, vps->max_latency_increase_plus1[i], G_MAXUINT32 - 1); +@@ -2048,7 +2050,7 @@ gst_h265_parse_sps (GstH265Parser * parser, GstH265NalUnit * nalu, + for (i = + (sps->sub_layer_ordering_info_present_flag ? 0 : + sps->max_sub_layers_minus1); i <= sps->max_sub_layers_minus1; i++) { +- READ_UE_MAX (&nr, sps->max_dec_pic_buffering_minus1[i], 16); ++ READ_UE_MAX (&nr, sps->max_dec_pic_buffering_minus1[i], MAX_DPB_SIZE - 1); + READ_UE_MAX (&nr, sps->max_num_reorder_pics[i], + sps->max_dec_pic_buffering_minus1[i]); + READ_UE_MAX (&nr, sps->max_latency_increase_plus1[i], G_MAXUINT32 - 1); +-- +2.25.1 +
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/CVE-2025-3887-2.patch new file +95 -0
95 lines not on this page · raw message
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.22.12.bb +2 -0
@@ -9,6 +9,8 @@ SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad file://0001-fix-maybe-uninitialized-warnings-when-compiling-with.patch \ file://0002-avoid-including-sys-poll.h-directly.patch \ file://0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch \ + file://CVE-2025-3887-1.patch \ + file://CVE-2025-3887-2.patch \ " SRC_URI[sha256sum] = "388b4c4412f42e36a38b17cc34119bc11879bd4d9fbd4ff6d03b2c7fc6b4d494"
Signature · 1 line
2.43.0
PATCH 3/8 expect: Revert "expect-native: fix do_compile failure with gcc-14"
In reply to Steve SakomanFrom: Adrian Freihofer <[email protected]>
In the meantime there is a cleaner fix on the master branch and we also need to back-port more patches to support gcc-15 as well.
This reverts commit 8bfdb53247c917559e7813c2e1bd2f6eb13c811d which is not in the master branch as a preparation for cherry-picking the newer fixes from there.
--- meta/recipes-devtools/expect/expect_5.45.4.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/expect/expect_5.45.4.bb +1 -1
@@ -85,4 +85,4 @@ BBCLASSEXTEND = "native nativesdk" # http://errors.yoctoproject.org/Errors/Details/766950/ # expect5.45.4/exp_chan.c:62:5: error: initialization of 'struct Tcl_ChannelTypeVersion_ *' from incompatible pointer type 'int (*)(void *, int)' [-Wincompatible-pointer-types] -CFLAGS:append = " -Wno-error=incompatible-pointer-types" +CFLAGS += "-Wno-error=incompatible-pointer-types"
Signature · 1 line
2.43.0
PATCH 4/8 expect: update code for Tcl channel implementation
In reply to Steve SakomanFrom: Ross Burton <[email protected]>
Tcl 8.4.0 changed the channel implementation, take a patch submitted upstream to update the code for the new interface and remove the silencing of the incompatible assignment error which was due to this issue.
--- .../expect/expect/tcl840.patch | 27 +++++++++++++++++++ meta/recipes-devtools/expect/expect_5.45.4.bb | 5 +--- 2 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 meta/recipes-devtools/expect/expect/tcl840.patch
meta/recipes-devtools/expect/expect/tcl840.patch new file +27 -0
@@ -0,0 +1,27 @@ +Adjustments for compatibility with the currrent (Tcl 8.4.0+) channel +implementation. + +Upstream-Status: Submitted [https://sourceforge.net/p/expect/patches/24/] +Signed-off-by: Ross Burton <[email protected]> + +diff --git a/exp_chan.c b/exp_chan.c +index c92e26b6fbd02305..944200a63b102672 100644 +--- a/exp_chan.c ++++ b/exp_chan.c +@@ -60,7 +60,7 @@ void exp_background_channelhandler _ANSI_ARGS_((ClientData, + + Tcl_ChannelType expChannelType = { + "exp", /* Type name. */ +- ExpBlockModeProc, /* Set blocking/nonblocking mode.*/ ++ TCL_CHANNEL_VERSION_2, + ExpCloseProc, /* Close proc. */ + ExpInputProc, /* Input proc. */ + ExpOutputProc, /* Output proc. */ +@@ -70,6 +70,7 @@ Tcl_ChannelType expChannelType = { + ExpWatchProc, /* Initialize notifier. */ + ExpGetHandleProc, /* Get OS handles out of channel. */ + NULL, /* Close2 proc */ ++ ExpBlockModeProc, /* Set blocking/nonblocking mode.*/ + }; + + typedef struct ThreadSpecificData {
meta/recipes-devtools/expect/expect_5.45.4.bb +1 -4
@@ -28,6 +28,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/expect/Expect/${PV}/${BPN}${PV}.tar.gz \ file://0001-fixline1-fix-line-1.patch \ file://0001-Add-prototype-to-function-definitions.patch \ file://expect-configure-c99.patch \ + file://tcl840.patch \ file://run-ptest \ " SRC_URI[md5sum] = "00fce8de158422f5ccd2666512329bd2"
@@ -82,7 +83,3 @@ FILES:${PN} += "${libdir}/libexpect${PV}.so \ " BBCLASSEXTEND = "native nativesdk" - -# http://errors.yoctoproject.org/Errors/Details/766950/ -# expect5.45.4/exp_chan.c:62:5: error: initialization of 'struct Tcl_ChannelTypeVersion_ *' from incompatible pointer type 'int (*)(void *, int)' [-Wincompatible-pointer-types] -CFLAGS += "-Wno-error=incompatible-pointer-types"
Signature · 1 line
2.43.0
PATCH 5/8 expect: don't run aclocal in do_configure
In reply to Steve SakomanFrom: Ross Burton <[email protected]>
expect has a hand-maintained aclocal.m4 so don't run aclocal, which has the side effect of not deleting the aclocal.m4 file which pulls in macros.
The build works without this change more through luck and a combination of behaviours than design.
--- meta/recipes-devtools/expect/expect_5.45.4.bb | 2 ++ 1 file changed, 2 insertions(+)
meta/recipes-devtools/expect/expect_5.45.4.bb +2 -0
@@ -39,6 +39,8 @@ UPSTREAM_CHECK_REGEX = "/Expect/(?P<pver>(\d+[\.\-_]*)+)/" S = "${WORKDIR}/${BPN}${PV}" +EXTRA_AUTORECONF += "--exclude=aclocal" + do_install:append() { install -d ${D}${libdir} install -m 0755 ${D}${libdir}/expect${PV}/libexpect*.so ${D}${libdir}/
Signature · 1 line
2.43.0
PATCH 6/8 expect: cleanup do_install
In reply to Steve SakomanFrom: Ross Burton <[email protected]>
Clean up the do_install append, and remove a long-standing unused variable that appears to be intending to not install the scripts but would have never actually done that as the relevant override since 2008 has been task-install. As we've been installing the scripts, keep instaling them.
--- meta/recipes-devtools/expect/expect_5.45.4.bb | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
meta/recipes-devtools/expect/expect_5.45.4.bb +3 -6
@@ -42,11 +42,9 @@ S = "${WORKDIR}/${BPN}${PV}" EXTRA_AUTORECONF += "--exclude=aclocal" do_install:append() { - install -d ${D}${libdir} - install -m 0755 ${D}${libdir}/expect${PV}/libexpect*.so ${D}${libdir}/ - install -m 0755 ${S}/fixline1 ${D}${libdir}/expect${PV}/ - rm ${D}${libdir}/expect${PV}/libexpect*.so - sed -e 's|$dir|${libdir}|' -i ${D}${libdir}/expect${PV}/pkgIndex.tcl + mv ${D}${libdir}/expect${PV}/libexpect*.so ${D}${libdir}/ + install -m 0755 ${S}/fixline1 ${D}${libdir}/expect${PV}/ + sed -e 's|$dir|${libdir}|' -i ${D}${libdir}/expect${PV}/pkgIndex.tcl } do_install_ptest() {
@@ -65,7 +63,6 @@ EXTRA_OECONF += "--with-tcl=${STAGING_LIBDIR} \ --disable-rpath \ ${TCL_INCLUDE_PATH} \ " -EXTRA_OEMAKE_install = " 'SCRIPTS=' " ALTERNATIVE:${PN} = "mkpasswd" ALTERNATIVE_LINK_NAME[mkpasswd] = "${bindir}/mkpasswd"
Signature · 1 line
2.43.0
PATCH 7/8 expect: Fix build with GCC 15
In reply to Steve SakomanFrom: Khem Raj <[email protected]>
Stick to C17 standard as GCC 15 switches to C23
--- meta/recipes-devtools/expect/expect_5.45.4.bb | 2 ++ 1 file changed, 2 insertions(+)
meta/recipes-devtools/expect/expect_5.45.4.bb +2 -0
@@ -41,6 +41,8 @@ S = "${WORKDIR}/${BPN}${PV}" EXTRA_AUTORECONF += "--exclude=aclocal" +CFLAGS += "-std=gnu17" + do_install:append() { mv ${D}${libdir}/expect${PV}/libexpect*.so ${D}${libdir}/ install -m 0755 ${S}/fixline1 ${D}${libdir}/expect${PV}/
Signature · 1 line
2.43.0
PATCH 8/8 expect: fix native build with GCC 15
In reply to Steve SakomanFrom: Adrian Freihofer <[email protected]>
This does not work for native builds:
CFLAGS += "-std=gnu17"
The line from native.bbclass gets priority:
CFLAGS = "${BUILD_CFLAGS}"
From bitbake-getvar -r expect-native CFLAGS
...
append ...poky/meta/recipes-devtools/expect/expect_5.45.4.bb:44
"-std=gnu17"
set ...poky/meta/classes-recipe/native.bbclass:44
"${BUILD_CFLAGS}"
...--- meta/recipes-devtools/expect/expect_5.45.4.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/expect/expect_5.45.4.bb +1 -1
@@ -41,7 +41,7 @@ S = "${WORKDIR}/${BPN}${PV}" EXTRA_AUTORECONF += "--exclude=aclocal" -CFLAGS += "-std=gnu17" +CFLAGS:append = " -std=gnu17" do_install:append() { mv ${D}${libdir}/expect${PV}/libexpect*.so ${D}${libdir}/
Signature · 1 line
2.43.0