Patch review
cover Patch review
Please review this set of changes for kirkstone and have comments back by end of day Tuesday, May 13
Passed a-full on autobuilder:
https://autobuilder.yoctoproject.org/valkyrie/#/builders/29/builds/1554
The following changes since commit 25ba9895b98715adb66a06e50f644aea2e2c9eb6:
Revert "cve-update-nvd2-native: Tweak to work better with NFS DL_DIR" (2025-04-29 07:45:33 -0700)
are available in the Git repository at:
https://git.openembedded.org/openembedded-core-contrib stable/kirkstone-nut
https://git.openembedded.org/openembedded-core-contrib/log/?h=stable/kirkstone-nut
Haixiao Yan (1):
glibc: Add single-threaded fast path to rand()
Hitendra Prajapati (1):
busybox: fix CVE-2023-39810
Peter Marko (3):
ghostscript: ignore CVE-2025-27837
ghostscript: ignore CVE-2024-29507
qemu: ignore CVE-2023-1386
Praveen Kumar (1):
connman :fix CVE-2025-32743
.../connman/connman/CVE-2025-32743.patch | 43 ++++++ .../connman/connman_1.41.bb | 1 + .../busybox/busybox/CVE-2023-39810.patch | 131 ++++++++++++++++++ meta/recipes-core/busybox/busybox_1.35.0.bb | 1 + ...dd-single-threaded-fast-path-to-rand.patch | 47 +++++++ meta/recipes-core/glibc/glibc_2.35.bb | 1 + meta/recipes-devtools/qemu/qemu.inc | 3 + .../ghostscript/ghostscript_9.55.0.bb | 4 +- 8 files changed, 230 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-connectivity/connman/connman/CVE-2025-32743.patch create mode 100644 meta/recipes-core/busybox/busybox/CVE-2023-39810.patch create mode 100644 meta/recipes-core/glibc/glibc/0001-stdlib-Add-single-threaded-fast-path-to-rand.patch
Signature · 1 line
2.43.0
PATCH 1/6 ghostscript: ignore CVE-2025-27837
From: Peter Marko <[email protected]>
This CVE only impacts codepaths relevant for Windows builds. Se [1] from Debian which marks it as not applicable.
[1] https://security-tracker.debian.org/tracker/CVE-2025-27837
--- meta/recipes-extended/ghostscript/ghostscript_9.55.0.bb | 2 ++ 1 file changed, 2 insertions(+)
meta/recipes-extended/ghostscript/ghostscript_9.55.0.bb +2 -0
@@ -26,6 +26,8 @@ CVE_CHECK_IGNORE += "CVE-2013-6629" CVE_CHECK_IGNORE += "CVE-2023-38560 CVE-2024-46954" # Vulnerable code was introduced in 9.56.0, so 9.55.0 is not affected yet CVE_CHECK_IGNORE += "CVE-2025-27833" +# Only impacts codepaths relevant for Windows builds +CVE_CHECK_IGNORE += "CVE-2025-27837" def gs_verdir(v): return "".join(v.split("."))
Signature · 1 line
2.43.0
PATCH 2/6 ghostscript: ignore CVE-2024-29507
In reply to Steve SakomanFrom: Peter Marko <[email protected]>
Fix for this CVE is [3] (per [1] and [2]).
It fixes cidfsubstfont handling which is not present in 9.55.0 yet. It was introduced (as cidsubstpath) in 9.56.0 via [4] and later modified to cidfsubstfont in [5].
Since this recipe has version 9.55.0, mark it as not affected yet.
[1] https://cgit.ghostscript.com/cgi-bin/cgit.cgi/ghostpdl.git/commit/?id=7745dbe24514710b0cfba925e608e607dee9eb0f
[2] https://nvd.nist.gov/vuln/detail/CVE-2024-29507
[3] https://security-tracker.debian.org/tracker/CVE-2024-29507
[4] https://cgit.ghostscript.com/cgi-bin/cgit.cgi/ghostpdl.git/commit/?id=82efed6cae8b0f2a3d10593b21083be1e7b1ab23
[5] https://cgit.ghostscript.com/cgi-bin/cgit.cgi/ghostpdl.git/commit/?id=4422012f6b40f0627d3527dba92f3a1ba30017d3
--- meta/recipes-extended/ghostscript/ghostscript_9.55.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-extended/ghostscript/ghostscript_9.55.0.bb +1 -1
@@ -25,7 +25,7 @@ CVE_CHECK_IGNORE += "CVE-2013-6629" # Issue in the GhostPCL. GhostPCL not part of this GhostScript recipe. CVE_CHECK_IGNORE += "CVE-2023-38560 CVE-2024-46954" # Vulnerable code was introduced in 9.56.0, so 9.55.0 is not affected yet -CVE_CHECK_IGNORE += "CVE-2025-27833" +CVE_CHECK_IGNORE += "CVE-2024-29507 CVE-2025-27833" # Only impacts codepaths relevant for Windows builds CVE_CHECK_IGNORE += "CVE-2025-27837"
Signature · 1 line
2.43.0
PATCH 3/6 connman :fix CVE-2025-32743
In reply to Steve SakomanFrom: Praveen Kumar <[email protected]>
In ConnMan through 1.44, the lookup string in ns_resolv in dnsproxy.c can be NULL or an empty string when the TC (Truncated) bit is set in a DNS response. This allows attackers to cause a denial of service (application crash) or possibly execute arbitrary code, because those lookup values lead to incorrect length calculations and incorrect memcpy operations.
Reference:
https://nvd.nist.gov/vuln/detail/CVE-2025-32743
Upstream-patch:
https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=d90b911f6760959bdf1393c39fe8d1118315490f
--- .../connman/connman/CVE-2025-32743.patch | 43 +++++++++++++++++++ .../connman/connman_1.41.bb | 1 + 2 files changed, 44 insertions(+) create mode 100644 meta/recipes-connectivity/connman/connman/CVE-2025-32743.patch
meta/recipes-connectivity/connman/connman/CVE-2025-32743.patch new file +43 -0
@@ -0,0 +1,43 @@ +From d90b911f6760959bdf1393c39fe8d1118315490f Mon Sep 17 00:00:00 2001 +From: Praveen Kumar <[email protected]> +Date: Thu, 24 Apr 2025 11:39:29 +0000 +Subject: [PATCH] dnsproxy: Fix NULL/empty lookup causing potential crash + +In ConnMan through 1.44, the lookup string in ns_resolv in dnsproxy.c +can be NULL or an empty string when the TC (Truncated) bit is set in +a DNS response. This allows attackers to cause a denial of service +(application crash) or possibly execute arbitrary code, because those +lookup values lead to incorrect length calculations and incorrect +memcpy operations. + +This patch includes a check to make sure loookup value is valid before +using it. This helps avoid unexpected value when the input is empty or +incorrect. + +Fixes: CVE-2025-32743 + +CVE: CVE-2025-32743 + +Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=d90b911f6760959bdf1393c39fe8d1118315490f] + +Signed-off-by: Praveen Kumar <[email protected]> +--- + src/dnsproxy.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/dnsproxy.c b/src/dnsproxy.c +index cf1d36c..334dd00 100644 +--- a/src/dnsproxy.c ++++ b/src/dnsproxy.c +@@ -1615,6 +1615,9 @@ static int ns_resolv(struct server_data *server, struct request_data *req, + char *dot, *lookup = (char *) name; + struct cache_entry *entry; + ++ if (!lookup || strlen(lookup) == 0) ++ return -EINVAL; ++ + entry = cache_check(request, &type, req->protocol); + if (entry) { + int ttl_left = 0; +-- +2.40.0
meta/recipes-connectivity/connman/connman_1.41.bb +1 -0
@@ -9,6 +9,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \ file://CVE-2022-32293_p2.patch \ file://CVE-2022-32292.patch \ file://CVE-2023-28488.patch \ + file://CVE-2025-32743.patch \ " SRC_URI:append:libc-musl = " file://0002-resolve-musl-does-not-implement-res_ninit.patch"
Signature · 1 line
2.43.0
PATCH 4/6 busybox: fix CVE-2023-39810
In reply to Steve SakomanFrom: Hitendra Prajapati <[email protected]>
Upstream-Status: Backport from https://git.busybox.net/busybox/commit/?id=9a8796436b9b0641e13480811902ea2ac57881d3
--- .../busybox/busybox/CVE-2023-39810.patch | 131 ++++++++++++++++++ meta/recipes-core/busybox/busybox_1.35.0.bb | 1 + 2 files changed, 132 insertions(+) create mode 100644 meta/recipes-core/busybox/busybox/CVE-2023-39810.patch
meta/recipes-core/busybox/busybox/CVE-2023-39810.patch new file +131 -0
@@ -0,0 +1,131 @@ +From 9a8796436b9b0641e13480811902ea2ac57881d3 Mon Sep 17 00:00:00 2001 +From: Denys Vlasenko <[email protected]> +Date: Wed, 2 Oct 2024 10:12:05 +0200 +Subject: archival: disallow path traversals (CVE-2023-39810) + +Create new configure option for archival/libarchive based extractions to +disallow path traversals. +As this is a paranoid option and might introduce backward +incompatibility, default it to no. + +Fixes: CVE-2023-39810 + +Based on the patch by Peter Kaestle <[email protected]> + +Upstream-Status: Backport [https://git.busybox.net/busybox/commit/?id=9a8796436b9b0641e13480811902ea2ac57881d3] +CVE: CVE-2023-39810 +Signed-off-by: Hitendra Prajapati <[email protected]> +--- + archival/Config.src | 11 +++++++++++ + archival/libarchive/data_extract_all.c | 8 ++++++++ + archival/libarchive/unsafe_prefix.c | 6 +++++- + scripts/kconfig/lxdialog/check-lxdialog.sh | 2 +- + testsuite/cpio.tests | 23 ++++++++++++++++++++++ + 5 files changed, 48 insertions(+), 2 deletions(-) + +diff --git a/archival/Config.src b/archival/Config.src +index 6f4f30c..cbcd721 100644 +--- a/archival/Config.src ++++ b/archival/Config.src +@@ -35,4 +35,15 @@ config FEATURE_LZMA_FAST + This option reduces decompression time by about 25% at the cost of + a 1K bigger binary. + ++config FEATURE_PATH_TRAVERSAL_PROTECTION ++ bool "Prevent extraction of filenames with /../ path component" ++ default n ++ help ++ busybox tar and unzip remove "PREFIX/../" (if it exists) ++ from extracted names. ++ This option enables this behavior for all other unpacking applets, ++ such as cpio, ar, rpm. ++ GNU cpio 2.15 has NO such sanity check. ++# try other archivers and document their behavior? ++ + endmenu +diff --git a/archival/libarchive/data_extract_all.c b/archival/libarchive/data_extract_all.c +index 049c2c1..8a69711 100644 +--- a/archival/libarchive/data_extract_all.c ++++ b/archival/libarchive/data_extract_all.c +@@ -65,6 +65,14 @@ void FAST_FUNC data_extract_all(archive_handle_t *archive_handle) + } while (--n != 0); + } + #endif ++#if ENABLE_FEATURE_PATH_TRAVERSAL_PROTECTION ++ /* Strip leading "/" and up to last "/../" path component */ ++ dst_name = (char *)strip_unsafe_prefix(dst_name); ++#endif ++// ^^^ This may be a problem if some applets do need to extract absolute names. ++// (Probably will need to invent ARCHIVE_ALLOW_UNSAFE_NAME flag). ++// You might think that rpm needs it, but in my tests rpm's internal cpio ++// archive has names like "./usr/bin/FOO", not "/usr/bin/FOO". + + if (archive_handle->ah_flags & ARCHIVE_CREATE_LEADING_DIRS) { + char *slash = strrchr(dst_name, '/'); +diff --git a/archival/libarchive/unsafe_prefix.c b/archival/libarchive/unsafe_prefix.c +index 33e487b..6670811 100644 +--- a/archival/libarchive/unsafe_prefix.c ++++ b/archival/libarchive/unsafe_prefix.c +@@ -14,7 +14,11 @@ const char* FAST_FUNC strip_unsafe_prefix(const char *str) + cp++; + continue; + } +- if (is_prefixed_with(cp, "/../"+1)) { ++ /* We are called lots of times. ++ * is_prefixed_with(cp, "../") is slower than open-coding it, ++ * with minimal code growth (~few bytes). ++ */ ++ if (cp[0] == '.' && cp[1] == '.' && cp[2] == '/') { + cp += 3; + continue; + } +diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh +index 7003e02..b91a54b 100755 +--- a/scripts/kconfig/lxdialog/check-lxdialog.sh ++++ b/scripts/kconfig/lxdialog/check-lxdialog.sh +@@ -55,7 +55,7 @@ trap "rm -f $tmp" 0 1 2 3 15 + check() { + $cc -x c - -o $tmp 2>/dev/null <<'EOF' + #include CURSES_LOC +-main() {} ++int main() { return 0; } + EOF + if [ $? != 0 ]; then + echo " *** Unable to find the ncurses libraries or the" 1>&2 +diff --git a/testsuite/cpio.tests b/testsuite/cpio.tests +index 85e7465..a4462c5 100755 +--- a/testsuite/cpio.tests ++++ b/testsuite/cpio.tests +@@ -154,6 +154,29 @@ testing "cpio -R with extract" \ + " "" "" + SKIP= + ++# Create an archive containing a file with "../dont_write" filename. ++# See that it will not be allowed to unpack. ++# NB: GNU cpio 2.15 DOES NOT do such checks. ++optional FEATURE_PATH_TRAVERSAL_PROTECTION ++rm -rf cpio.testdir ++mkdir -p cpio.testdir/prepare/inner ++echo "file outside of destination was written" > cpio.testdir/prepare/dont_write ++echo "data" > cpio.testdir/prepare/inner/to_extract ++mkdir -p cpio.testdir/extract ++testing "cpio extract file outside of destination" "\ ++(cd cpio.testdir/prepare/inner && echo -e '../dont_write\nto_extract' | cpio -o -H newc) | (cd cpio.testdir/extract && cpio -vi 2>&1) ++echo \$? ++ls cpio.testdir/dont_write 2>&1" \ ++"\ ++cpio: removing leading '../' from member names ++../dont_write ++to_extract ++1 blocks ++0 ++ls: cpio.testdir/dont_write: No such file or directory ++" "" "" ++SKIP= ++ + # Clean up + rm -rf cpio.testdir cpio.testdir2 2>/dev/null + +-- +2.25.1 +
meta/recipes-core/busybox/busybox_1.35.0.bb +1 -0
@@ -58,6 +58,7 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://CVE-2023-42364_42365-2.patch \ file://CVE-2023-42366.patch \ file://0001-cut-Fix-s-flag-to-omit-blank-lines.patch \ + file://CVE-2023-39810.patch \ " SRC_URI:append:libc-musl = " file://musl.cfg "
Signature · 1 line
2.43.0
PATCH 5/6 qemu: ignore CVE-2023-1386
In reply to Steve SakomanFrom: Peter Marko <[email protected]>
Upstream Repository: https://gitlab.com/qemu-project/qemu.git
Bug Details: https://nvd.nist.gov/vuln/detail/CVE-2023-1386
Type: Security Advisory
CVE: CVE-2023-1386
Score: 3.3
Analysis:
- According to redhat[1] this CVE has closed as not a bug.
Reference:
[1] https://bugzilla.redhat.com/show_bug.cgi?id=2223985
(From OE-Core rev: 6a5d9e3821246c39ec57fa483802e1bb74fca724)
(Converted to old CVE_CHECK_IGNORE syntax)
--- meta/recipes-devtools/qemu/qemu.inc | 3 +++ 1 file changed, 3 insertions(+)
meta/recipes-devtools/qemu/qemu.inc +3 -0
@@ -161,6 +161,9 @@ CVE_CHECK_IGNORE += "CVE-2023-2680" # due to the rocker device not falling within the virtualization use case. CVE_CHECK_IGNORE += "CVE-2022-36648" +# disputed: not an issue as per https://bugzilla.redhat.com/show_bug.cgi?id=2223985 +CVE_CHECK_IGNORE += "CVE-2023-1386" + COMPATIBLE_HOST:mipsarchn32 = "null" COMPATIBLE_HOST:mipsarchn64 = "null" COMPATIBLE_HOST:riscv32 = "null"
Signature · 1 line
2.43.0
PATCH 6/6 glibc: Add single-threaded fast path to rand()
In reply to Steve SakomanFrom: Haixiao Yan <[email protected]>
Backport a patch [1] to improve performance of rand() and __random()[2] by adding a single-threaded fast path.
[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=be0cfd848d9ad7378800d6302bc11467cf2b514f
[2] https://sourceware.org/bugzilla/show_bug.cgi?id=32777
--- ...dd-single-threaded-fast-path-to-rand.patch | 47 +++++++++++++++++++ meta/recipes-core/glibc/glibc_2.35.bb | 1 + 2 files changed, 48 insertions(+) create mode 100644 meta/recipes-core/glibc/glibc/0001-stdlib-Add-single-threaded-fast-path-to-rand.patch
meta/recipes-core/glibc/glibc/0001-stdlib-Add-single-threaded-fast-path-to-rand.patch new file +47 -0
@@ -0,0 +1,47 @@ +From 4f54b0dfc16dbe0df86afccb90e447df5f7f571e Mon Sep 17 00:00:00 2001 +From: Wilco Dijkstra <[email protected]> +Date: Mon, 18 Mar 2024 15:18:20 +0000 +Subject: [PATCH] stdlib: Add single-threaded fast path to rand() +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Improve performance of rand() and __random() by adding a single-threaded +fast path. Bench-random-lock shows about 5x speedup on Neoverse V1. + +Upstream-Status: Backport [be0cfd848d9ad7378800d6302bc11467cf2b514f] + +Reviewed-by: Adhemerval Zanella <[email protected]> +Signed-off-by: Haixiao Yan <[email protected]> +--- + stdlib/random.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/stdlib/random.c b/stdlib/random.c +index 17cc61ba8f55..5d482a857065 100644 +--- a/stdlib/random.c ++++ b/stdlib/random.c +@@ -51,6 +51,7 @@ + SUCH DAMAGE.*/ + + #include <libc-lock.h> ++#include <sys/single_threaded.h> + #include <limits.h> + #include <stddef.h> + #include <stdlib.h> +@@ -288,6 +289,12 @@ __random (void) + { + int32_t retval; + ++ if (SINGLE_THREAD_P) ++ { ++ (void) __random_r (&unsafe_state, &retval); ++ return retval; ++ } ++ + __libc_lock_lock (lock); + + (void) __random_r (&unsafe_state, &retval); +-- +2.34.1 +
meta/recipes-core/glibc/glibc_2.35.bb +1 -0
@@ -65,6 +65,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ file://0001-Revert-Linux-Implement-a-useful-version-of-_startup_.patch \ file://0002-get_nscd_addresses-Fix-subscript-typos-BZ-29605.patch \ file://0003-sunrpc-suppress-gcc-os-warning-on-user2netname.patch \ + file://0001-stdlib-Add-single-threaded-fast-path-to-rand.patch \ " S = "${WORKDIR}/git" B = "${WORKDIR}/build-${TARGET_SYS}"
Signature · 1 line
2.43.0