mtr: patch CVE-2025-49809
PATCH 1/8 mtr: patch CVE-2025-49809
Details: https://nvd.nist.gov/vuln/detail/CVE-2025-49809
Pick the patch mentioned in the NVD report.
--- .../mtr/mtr/CVE-2025-49809.patch | 38 +++++++++++++++++++ .../recipes-support/mtr/mtr_0.95.bb | 4 +- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 meta-networking/recipes-support/mtr/mtr/CVE-2025-49809.patch
meta-networking/recipes-support/mtr/mtr/CVE-2025-49809.patch new file +38 -0
@@ -0,0 +1,38 @@ +From 5eefb172ef1ab9e46d79c6bae60dbe7983c9f704 Mon Sep 17 00:00:00 2001 +From: "R.E. Wolff" <[email protected]> +Date: Sun, 29 Jun 2025 14:06:00 +0200 +Subject: [PATCH] Added protection against use of MTR_PACKET under special + circumstances + +CVE: CVE-2025-49809 +Upstream-Status: Backport [https://github.com/traviscross/mtr/commit/5226f105f087c29d3cfad9f28000e7536af91ac6] +Signed-off-by: Gyorgy Sarvari <[email protected]> +--- + ui/cmdpipe.c | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) + +diff --git a/ui/cmdpipe.c b/ui/cmdpipe.c +index d22b236..1a66293 100644 +--- a/ui/cmdpipe.c ++++ b/ui/cmdpipe.c +@@ -220,10 +220,17 @@ void execute_packet_child( + the path to the mtr-packet executable. This is necessary + for debugging changes for mtr-packet. + */ +- char *mtr_packet_path = getenv("MTR_PACKET"); +- if (mtr_packet_path == NULL) { ++ char * mtr_packet_path = NULL; ++ ++ // In the rare case that mtr-packet is not setuid-root, ++ // and a select group of users has sudo privileges to run ++ // mtr and not much else, THEN create /etc/mtr.is.run.under.sudo ++ // to prevent a privilege escalation when one of those accounts ++ // is compromised. CVE-2025-49809 ++ if (access ("/etc/mtr.is.run.under.sudo", F_OK) != 0) ++ mtr_packet_path = getenv("MTR_PACKET"); ++ if (mtr_packet_path == NULL) + mtr_packet_path = "mtr-packet"; +- } + + /* + First, try to execute mtr-packet from PATH
meta-networking/recipes-support/mtr/mtr_0.95.bb +3 -1
@@ -9,7 +9,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ file://ui/mtr.c;beginline=5;endline=16;md5=00a894a39d53726a27386534d1c4e468" SRCREV = "852e5617fbf331cf292723702161f0ac9afe257c" -SRC_URI = "git://github.com/traviscross/mtr;branch=master;protocol=https" +SRC_URI = "git://github.com/traviscross/mtr;branch=master;protocol=https \ + file://CVE-2025-49809.patch \ + " S = "${WORKDIR}/git"
PATCH 2/8 mpd: Update status for CVE-2020-7465 and CVE-2020-7466
From: Ninette Adhikari <[email protected]>
The recipe used in the meta-openembedded is a different mpd package compared to the one which has the CVE issue. Package used in meta-embedded: http://www.musicpd.org
Package with CVE issue: https://sourceforge.net/projects/mpd/
No action required.
Adapted to Kirkstone (CVE_STATUS -> CVE_CHECK_IGNORE)
--- meta-multimedia/recipes-multimedia/musicpd/mpd_0.23.12.bb | 3 +++ 1 file changed, 3 insertions(+)
meta-multimedia/recipes-multimedia/musicpd/mpd_0.23.12.bb +3 -0
@@ -99,3 +99,6 @@ USERADD_PARAM:${PN} = " \ --home ${localstatedir}/lib/mpd \ --groups audio \ --user-group mpd" + +# cpe-incorrect: The recipe used in the meta-openembedded is a different mpd package compared to the one which has the CVE issue. +CVE_CHECK_IGNORE += "CVE-2020-7465 CVE-2020-7466"
PATCH 3/8 nanopb: patch CVE-2024-53984
In reply to Gyorgy SarvariDetails: https://nvd.nist.gov/vuln/detail/CVE-2024-53984
Pick the patch referenced by the nvd report.
--- .../nanopb/nanopb/CVE-2024-53984.patch | 36 +++++++++++++++++++ .../recipes-devtools/nanopb/nanopb_0.4.5.bb | 4 ++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 meta-oe/dynamic-layers/meta-python/recipes-devtools/nanopb/nanopb/CVE-2024-53984.patch
meta-oe/dynamic-layers/meta-python/recipes-devtools/nanopb/nanopb/CVE-2024-53984.patch new file +36 -0
@@ -0,0 +1,36 @@ +From 84e8fb3da74d3b83179700284ce47c98a8804ab1 Mon Sep 17 00:00:00 2001 +From: Petteri Aimonen <[email protected]> +Date: Sun, 1 Dec 2024 11:40:38 +0200 +Subject: [PATCH] Fix memory not released on error return (GHSA-xwqq-qxmw-hj5r) + +When all of the following conditions apply: + +* Compile time option PB_ENABLE_MALLOC is enabled. +* Message contains at least one field with FT_POINTER field type. +* Custom stream callback is used with unknown stream length (stream.bytes_left = SIZE_MAX) +* pb_decode_ex() function is used with flag PB_DECODE_DELIMITED. +* The input message is corrupted (accidentally or maliciously) in the length prefix. + +Then the pb_decode_ex() function does not automatically call pb_release(), like is done for other failure cases. +This could lead to memory leak and potential denial-of-service. + +CVE: CVE-2024-53984 +Upstream-Status: Backport [https://github.com/nanopb/nanopb/commit/2b86c255aa52250438d5aba124d0e86db495b378] +Signed-off-by: Gyorgy Sarvari <[email protected]> +--- + pb_decode.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pb_decode.c b/pb_decode.c +index b194825..2a22607 100644 +--- a/pb_decode.c ++++ b/pb_decode.c +@@ -1156,7 +1156,7 @@ bool checkreturn pb_decode_ex(pb_istream_t *stream, const pb_msgdesc_t *fields, + status = pb_decode_inner(&substream, fields, dest_struct, flags); + + if (!pb_close_string_substream(stream, &substream)) +- return false; ++ status = false; + } + + #ifdef PB_ENABLE_MALLOC
meta-oe/dynamic-layers/meta-python/recipes-devtools/nanopb/nanopb_0.4.5.bb +3 -1
@@ -4,7 +4,9 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=9db4b73a55a3994384112efcdb37c01f" DEPENDS = "protobuf-native" -SRC_URI = "git://github.com/nanopb/nanopb.git;branch=master;protocol=https" +SRC_URI = "git://github.com/nanopb/nanopb.git;branch=master;protocol=https \ + file://CVE-2024-53984.patch \ + " SRCREV = "c9124132a604047d0ef97a09c0e99cd9bed2c818" S = "${WORKDIR}/git"
PATCH 4/8 redis: ignore CVE-2025-46686
In reply to Gyorgy SarvariDetails: https://nvd.nist.gov/vuln/detail/CVE-2025-46686
Upstream disputes that it is a security violation, and says that implementing a mitigation for this would negatively affect the rest of the application, so they elected to ignore it.
See Github advisory about the same vulnerability:
https://github.com/redis/redis/security/advisories/GHSA-2r7g-8hpc-rpq9
--- meta-oe/recipes-extended/redis/redis_6.2.21.bb | 2 ++ meta-oe/recipes-extended/redis/redis_7.0.15.bb | 2 ++ 2 files changed, 4 insertions(+)
meta-oe/recipes-extended/redis/redis_6.2.21.bb +2 -0
@@ -25,6 +25,8 @@ inherit autotools-brokensep update-rc.d systemd useradd CVE_CHECK_IGNORE += "CVE-2022-0543" # not-applicable-config: only affects Windows CVE_CHECK_IGNORE += "CVE-2022-3734" +# disputed: not strictly a bug, mitigating it would affect functionality +CVE_CHECK_IGNORE += "CVE-2025-46686" FINAL_LIBS:x86:toolchain-clang = "-latomic" FINAL_LIBS:riscv32:toolchain-clang = "-latomic"
meta-oe/recipes-extended/redis/redis_7.0.15.bb +2 -0
@@ -38,6 +38,8 @@ inherit autotools-brokensep update-rc.d systemd useradd CVE_CHECK_IGNORE += "CVE-2022-0543" # not-applicable-config: only affects Windows CVE_CHECK_IGNORE += "CVE-2022-3734" +# disputed: not strictly a bug, mitigating it would affect functionality +CVE_CHECK_IGNORE += "CVE-2025-46686" FINAL_LIBS:x86:toolchain-clang = "-latomic" FINAL_LIBS:riscv32:toolchain-clang = "-latomic"
PATCH 5/8 cups-filters: patch CVE-2025-57812
In reply to Gyorgy SarvariDetails: https://nvd.nist.gov/vuln/detail/CVE-2025-57812
Backport the patch that is referenced by te nvd report.
--- .../recipes-printing/cups/cups-filters.inc | 4 +- .../cups/cups-filters/CVE-2025-57812.patch | 127 ++++++++++++++++++ 2 files changed, 130 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-printing/cups/cups-filters/CVE-2025-57812.patch
meta-oe/recipes-printing/cups/cups-filters.inc +3 -1
@@ -9,7 +9,9 @@ SECTION = "console/utils" DEPENDS = "cups glib-2.0 glib-2.0-native dbus dbus-glib lcms ghostscript poppler qpdf libpng" DEPENDS:class-native = "poppler-native glib-2.0-native dbus-native pkgconfig-native gettext-native libpng-native" -SRC_URI = "http://openprinting.org/download/cups-filters/cups-filters-${PV}.tar.gz" +SRC_URI = "http://openprinting.org/download/cups-filters/cups-filters-${PV}.tar.gz \ + file://CVE-2025-57812.patch \ + " inherit autotools-brokensep gettext pkgconfig
meta-oe/recipes-printing/cups/cups-filters/CVE-2025-57812.patch new file +127 -0
127 lines not on this page · raw message
PATCH 6/8 cups-filters: patch CVE-2025-64524
In reply to Gyorgy SarvariDetails: https://nvd.nist.gov/vuln/detail/CVE-2025-64524
Pick the patch referenced by the nvd report.
--- .../recipes-printing/cups/cups-filters.inc | 1 + .../cups/cups-filters/CVE-2025-64524.patch | 81 +++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 meta-oe/recipes-printing/cups/cups-filters/CVE-2025-64524.patch
meta-oe/recipes-printing/cups/cups-filters.inc +1 -0
@@ -11,6 +11,7 @@ DEPENDS:class-native = "poppler-native glib-2.0-native dbus-native pkgconfig-nat SRC_URI = "http://openprinting.org/download/cups-filters/cups-filters-${PV}.tar.gz \ file://CVE-2025-57812.patch \ + file://CVE-2025-64524.patch \ " inherit autotools-brokensep gettext pkgconfig
meta-oe/recipes-printing/cups/cups-filters/CVE-2025-64524.patch new file +81 -0
81 lines not on this page · raw message
PATCH 7/8 cups-filters: patch CVE-2023-24805
In reply to Gyorgy SarvariDetails: https://nvd.nist.gov/vuln/detail/CVE-2023-24805
Pick the patch referenced by the nvd report.
--- .../recipes-printing/cups/cups-filters.inc | 1 + .../cups/cups-filters/CVE-2023-24805.patch | 213 ++++++++++++++++++ 2 files changed, 214 insertions(+) create mode 100644 meta-oe/recipes-printing/cups/cups-filters/CVE-2023-24805.patch
meta-oe/recipes-printing/cups/cups-filters.inc +1 -0
@@ -12,6 +12,7 @@ DEPENDS:class-native = "poppler-native glib-2.0-native dbus-native pkgconfig-nat SRC_URI = "http://openprinting.org/download/cups-filters/cups-filters-${PV}.tar.gz \ file://CVE-2025-57812.patch \ file://CVE-2025-64524.patch \ + file://CVE-2023-24805.patch \ " inherit autotools-brokensep gettext pkgconfig
meta-oe/recipes-printing/cups/cups-filters/CVE-2023-24805.patch new file +213 -0
213 lines not on this page · raw message
PATCH 8/8 dbus-broker: patch CVE-2022-31212
In reply to Gyorgy SarvariDetails: https://nvd.nist.gov/vuln/detail/CVE-2022-31212
A detailed writeup[1] is referenced by the nvd report, which describes that the vulnerability itself is not in the application, rather in a dependency of it, in c-shutil, which is pulled in as a submodule.
Pick the patch from this submodule that fixes a stack overflow, and adds a test explictly verifying the described vulnerability.
[1]: https://sec-consult.com/vulnerability-lab/advisory/memory-corruption-vulnerabilities-dbus-broker/
--- .../dbus/dbus-broker/CVE-2022-31212.patch | 70 +++++++++++++++++++ meta-oe/recipes-core/dbus/dbus-broker_29.bb | 4 +- 2 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-core/dbus/dbus-broker/CVE-2022-31212.patch
meta-oe/recipes-core/dbus/dbus-broker/CVE-2022-31212.patch new file +70 -0
@@ -0,0 +1,70 @@ +From 2dfb73805571bd48e92b2d09962bc99f3bc4f86b Mon Sep 17 00:00:00 2001 +From: David Rheinsberg <[email protected]> +Date: Tue, 19 Apr 2022 13:11:02 +0200 +Subject: [PATCH] strnspn: fix buffer overflow + +Fix the strnspn and strncspn functions to use a properly sized buffer. +It used to be 1 byte too short. Checking for `0xff` in a string will +thus write `0xff` once byte beyond the stack space of the local buffer. + +Note that the public API does not allow to pass `0xff` to those +functions. Therefore, this is a read-only buffer overrun, possibly +causing bogus reports from the parser, but still well-defined. + +Reported-by: Steffen Robertz +Signed-off-by: David Rheinsberg <[email protected]> + +CVE: CVE-2022-31212 +Upstream-Status: Backport [https://github.com/c-util/c-shquote/commit/7fd15f8e272136955f7ffc37df29fbca9ddceca1] +Signed-off-by: Gyorgy Sarvari <[email protected]> +--- + subprojects/c-shquote/src/c-shquote.c | 4 ++-- + subprojects/c-shquote/src/test-private.c | 6 ++++++ + 2 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/subprojects/c-shquote/src/c-shquote.c b/subprojects/c-shquote/src/c-shquote.c +index b268906..abb55d6 100644 +--- a/subprojects/c-shquote/src/c-shquote.c ++++ b/subprojects/c-shquote/src/c-shquote.c +@@ -85,7 +85,7 @@ int c_shquote_consume_char(char **outp, + size_t c_shquote_strnspn(const char *string, + size_t n_string, + const char *accept) { +- bool buffer[UCHAR_MAX] = {}; ++ bool buffer[UCHAR_MAX + 1] = {}; + + for ( ; *accept; ++accept) + buffer[(unsigned char)*accept] = true; +@@ -100,7 +100,7 @@ size_t c_shquote_strnspn(const char *string, + size_t c_shquote_strncspn(const char *string, + size_t n_string, + const char *reject) { +- bool buffer[UCHAR_MAX] = {}; ++ bool buffer[UCHAR_MAX + 1] = {}; + + if (strlen(reject) == 1) { + const char *p; +diff --git a/subprojects/c-shquote/src/test-private.c b/subprojects/c-shquote/src/test-private.c +index 57a7250..c6afe40 100644 +--- a/subprojects/c-shquote/src/test-private.c ++++ b/subprojects/c-shquote/src/test-private.c +@@ -148,6 +148,9 @@ static void test_strnspn(void) { + + len = c_shquote_strnspn("ab", 2, "bc"); + c_assert(len == 0); ++ ++ len = c_shquote_strnspn("ab", 2, "\xff"); ++ c_assert(len == 0); + } + + static void test_strncspn(void) { +@@ -167,6 +170,9 @@ static void test_strncspn(void) { + + len = c_shquote_strncspn("ab", 2, "cd"); + c_assert(len == 2); ++ ++ len = c_shquote_strncspn("ab", 2, "\xff"); ++ c_assert(len == 2); + } + + static void test_discard_comment(void) {
meta-oe/recipes-core/dbus/dbus-broker_29.bb +3 -1
@@ -6,7 +6,9 @@ SECTION = "base" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=7b486c2338d225a1405d979ed2c15ce8" -SRC_URI = "https://github.com/bus1/dbus-broker/releases/download/v${PV}/dbus-broker-${PV}.tar.xz" +SRC_URI = "https://github.com/bus1/dbus-broker/releases/download/v${PV}/dbus-broker-${PV}.tar.xz \ + file://CVE-2022-31212.patch \ + " SRC_URI[sha256sum] = "4eca425db52b7ab1027153e93fea9b3f11759db9e93ffbf88759b73ddfb8026a" UPSTREAM_CHECK_URI = "https://github.com/bus1/${BPN}/releases"