Patch review
cover Patch review
Please review this set of changes for kirkstone and have comments back by end of day Thursday, October 30
Passed a-full on the autobuilder:
https://autobuilder.yoctoproject.org/valkyrie/#/builders/29/builds/2650
The following changes since commit 9b3dbd691f6ebdbdfe88cef3d3a676ddd1399c63:
python3: upgrade 3.10.18 -> 3.10.19 (2025-10-17 07:39:27 -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
Hitendra Prajapati (1):
git: fix CVE-2025-48386
Peter Marko (1):
lz4: patch CVE-2025-62813
Yash Shinde (2):
binutils: fix CVE-2025-11081
binutils: fix CVE-2025-8225
.../binutils/binutils-2.38.inc | 2 + .../binutils/0046-CVE-2025-11081.patch | 84 ++++++++++++++++ .../binutils/0047-CVE-2025-8225.patch | 47 +++++++++ .../git/git/CVE-2025-48386.patch | 97 +++++++++++++++++++ meta/recipes-devtools/git/git_2.35.7.bb | 1 + .../lz4/files/CVE-2025-62813.patch | 69 +++++++++++++ meta/recipes-support/lz4/lz4_1.9.4.bb | 4 +- 7 files changed, 303 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-devtools/binutils/binutils/0046-CVE-2025-11081.patch create mode 100644 meta/recipes-devtools/binutils/binutils/0047-CVE-2025-8225.patch create mode 100644 meta/recipes-devtools/git/git/CVE-2025-48386.patch create mode 100644 meta/recipes-support/lz4/files/CVE-2025-62813.patch
Signature · 1 line
2.43.0
PATCH 1/4 binutils: fix CVE-2025-11081
From: Yash Shinde <[email protected]>
CVE: CVE-2025-11081
Trying to dump .sframe in a PE file results in a segfault accessing elf_section_data.
* objdump (dump_sframe_section, dump_dwarf_section): Don't access elf_section_type without first checking the file is ELF.
PR 33406 SEGV in dump_dwarf_section
[https://sourceware.org/bugzilla/show_bug.cgi?id=33406]
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=f87a66db645caf8cc0e6fc87b0c28c78a38af59b]
--- .../binutils/binutils-2.38.inc | 1 + .../binutils/0046-CVE-2025-11081.patch | 84 +++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 meta/recipes-devtools/binutils/binutils/0046-CVE-2025-11081.patch
meta/recipes-devtools/binutils/binutils-2.38.inc +1 -0
@@ -82,5 +82,6 @@ SRC_URI = "\ file://0043-CVE-2025-7545.patch \ file://0044-CVE-2025-11082.patch \ file://0045-CVE-2025-11083.patch \ + file://0046-CVE-2025-11081.patch \ " S = "${WORKDIR}/git"
meta/recipes-devtools/binutils/binutils/0046-CVE-2025-11081.patch new file +84 -0
84 lines not on this page · raw message
Signature · 1 line
2.43.0
PATCH 2/4 binutils: fix CVE-2025-8225
In reply to Steve SakomanFrom: Yash Shinde <[email protected]>
CVE: CVE-2025-8225
It is possible with fuzzed files to have num_debug_info_entries zero after allocating space for debug_information, leading to multiple allocations.
* dwarf.c (process_debug_info): Don't test num_debug_info_entries to determine whether debug_information has been allocated, test alloc_num_debug_info_entries.
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=e51fdff7d2e538c0e5accdd65649ac68e6e0ddd4]
--- .../binutils/binutils-2.38.inc | 1 + .../binutils/0047-CVE-2025-8225.patch | 47 +++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 meta/recipes-devtools/binutils/binutils/0047-CVE-2025-8225.patch
meta/recipes-devtools/binutils/binutils-2.38.inc +1 -0
@@ -83,5 +83,6 @@ SRC_URI = "\ file://0044-CVE-2025-11082.patch \ file://0045-CVE-2025-11083.patch \ file://0046-CVE-2025-11081.patch \ + file://0047-CVE-2025-8225.patch \ " S = "${WORKDIR}/git"
meta/recipes-devtools/binutils/binutils/0047-CVE-2025-8225.patch new file +47 -0
47 lines not on this page · raw message
Signature · 1 line
2.43.0
Re: [OE-core][kirkstone 2/4] binutils: fix CVE-2025-8225
this looks ok.
Quoted 99 lines · Steve Sakoman via lists.openembedded.org
From: Yash Shinde <[email protected]>
CVE: CVE-2025-8225
It is possible with fuzzed files to have
num_debug_info_entrieszero after allocating space fordebug_information, leading to multiple allocations.*
dwarf.c(process_debug_info): Don't testnum_debug_info_entriesto determine whetherdebug_informationhas been allocated, testalloc_num_debug_info_entries.Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=e51fdff7d2e538c0e5accdd65649ac68e6e0ddd4]
Signed-off-by Yash Shinde <[email protected]>Signed-off-by Steve Sakoman <[email protected]>--- .../binutils/binutils-2.38.inc | 1 + .../binutils/0047-CVE-2025-8225.patch | 47 +++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 meta/recipes-devtools/binutils/binutils/0047-CVE-2025-8225.patchmeta/recipes-devtools/binutils/binutils-2.38.inc +1
-0@@ -83,5 +83,6 @@ SRC_URI = "\ file://0044-CVE-2025-11082.patch \ file://0045-CVE-2025-11083.patch \ file://0046-CVE-2025-11081.patch \ + file://0047-CVE-2025-8225.patch \ " S = "${WORKDIR}/git"meta/recipes-devtools/binutils/binutils/0047-CVE-2025-8225.patch new file +47
-1@@ -0,0 +1,47 @@ +From e51fdff7d2e538c0e5accdd65649ac68e6e0ddd4 Mon Sep 17 00:00:00 2001 +From: Alan Modra <[email protected]> +Date: Wed, 19 Feb 2025 22:45:29 +1030 +Subject: [PATCH] binutils/dwarf.c debug_information leak + +It is possible with fuzzed files to have num_debug_info_entries zero +after allocating space for debug_information, leading to multiple +allocations. + + * dwarf.c (process_debug_info): Don't test num_debug_info_entries + to determine whether debug_information has been allocated, + test alloc_num_debug_info_entries. +--- + +Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=e51fdff7d2e538c0e5accdd65649ac68e6e0ddd4] +CVE: CVE-2025-8225 + + binutils/dwarf.c | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + +Signed-off-by: Alan Modra <[email protected]> +Signed-off-by: Yash Shinde <[email protected]> + +diff --git a/binutils/dwarf.c b/binutils/dwarf.c +index 8e004cea839..bfbf83ec9f4 100644 +--- a/binutils/dwarf.c ++++ b/binutils/dwarf.c +@@ -3807,13 +3807,11 @@ process_debug_info (struct dwarf_section * section, + } + + if ((do_loc || do_debug_loc || do_debug_ranges || do_debug_info) +- && num_debug_info_entries == 0 +- && ! do_types) ++ && alloc_num_debug_info_entries == 0 ++ && !do_types) + { +- + /* Then allocate an array to hold the information. */ +- debug_information = (debug_info *) cmalloc (num_units, +- sizeof (* debug_information)); ++ debug_information = cmalloc (num_units, sizeof (*debug_information)); + if (debug_information == NULL) + { + error (_("Not enough memory for a debug info array of %u entries\n"), +-- +2.43.7 + --2.43.0
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#225424): https://lists.openembedded.org/g/openembedded-core/message/225424
Mute This Topic: https://lists.openembedded.org/mt/116006916/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
PATCH 3/4 git: fix CVE-2025-48386
In reply to Steve SakomanFrom: Hitendra Prajapati <[email protected]>
Upstream-Status: Backport from https://github.com/git/git/commit/9de345cb273cc7faaeda279c7e07149d8a15a319
--- .../git/git/CVE-2025-48386.patch | 97 +++++++++++++++++++ meta/recipes-devtools/git/git_2.35.7.bb | 1 + 2 files changed, 98 insertions(+) create mode 100644 meta/recipes-devtools/git/git/CVE-2025-48386.patch
meta/recipes-devtools/git/git/CVE-2025-48386.patch new file +97 -0
@@ -0,0 +1,97 @@ +From 9de345cb273cc7faaeda279c7e07149d8a15a319 Mon Sep 17 00:00:00 2001 +From: Taylor Blau <[email protected]> +Date: Mon, 19 May 2025 18:30:29 -0400 +Subject: [PATCH] wincred: avoid buffer overflow in wcsncat() + +The wincred credential helper uses a static buffer ("target") as a +unique key for storing and comparing against internal storage. It does +this by building up a string is supposed to look like: + + git:$PROTOCOL://$USERNAME@$HOST/@path + +However, the static "target" buffer is declared as a wide string with no +more than 1,024 wide characters. The first call to wcsncat() is almost +correct (it copies no more than ARRAY_SIZE(target) wchar_t's), but does +not account for the trailing NUL, introducing an off-by-one error. + +But subsequent calls to wcsncat() have an additional problem on top of +the off-by-one. They do not account for the length of the existing +wide string being built up in 'target'. So the following: + + $ perl -e ' + my $x = "x" x 1_000; + print "protocol=$x\nhost=$x\nusername=$x\npath=$x\n" + ' | + C\:/Program\ Files/Git/mingw64/libexec/git-core/git-credential-wincred.exe get + +will result in a segmentation fault from over-filling buffer. + +This bug is as old as the wincred helper itself, dating back to +a6253da (contrib: add win32 credential-helper, 2012-07-27). Commit +8b2d219 (wincred: improve compatibility with windows versions, +2013-01-10) replaced the use of strncat() with wcsncat(), but retained +the buggy behavior. + +Fix this by using a "target_append()" helper which accounts for both the +length of the existing string within the buffer, as well as the trailing +NUL character. + +Reported-by: David Leadbeater <[email protected]> +Helped-by: David Leadbeater <[email protected]> +Helped-by: Jeff King <[email protected]> +Signed-off-by: Taylor Blau <[email protected]> + +CVE: CVE-2025-48386 +Upstream-Status: Backport [https://github.com/git/git/commit/9de345cb273cc7faaeda279c7e07149d8a15a319] +Signed-off-by: Hitendra Prajapati <[email protected]> +--- + .../wincred/git-credential-wincred.c | 22 +++++++++++++------ + 1 file changed, 15 insertions(+), 7 deletions(-) + +diff --git a/contrib/credential/wincred/git-credential-wincred.c b/contrib/credential/wincred/git-credential-wincred.c +index 5091048..00ecd87 100644 +--- a/contrib/credential/wincred/git-credential-wincred.c ++++ b/contrib/credential/wincred/git-credential-wincred.c +@@ -93,6 +93,14 @@ static void load_cred_funcs(void) + + static WCHAR *wusername, *password, *protocol, *host, *path, target[1024]; + ++static void target_append(const WCHAR *src) ++{ ++ size_t avail = ARRAY_SIZE(target) - wcslen(target) - 1; /* -1 for NUL */ ++ if (avail < wcslen(src)) ++ die("target buffer overflow"); ++ wcsncat(target, src, avail); ++} ++ + static void write_item(const char *what, LPCWSTR wbuf, int wlen) + { + char *buf; +@@ -304,17 +312,17 @@ int main(int argc, char *argv[]) + + /* prepare 'target', the unique key for the credential */ + wcscpy(target, L"git:"); +- wcsncat(target, protocol, ARRAY_SIZE(target)); +- wcsncat(target, L"://", ARRAY_SIZE(target)); ++ target_append(protocol); ++ target_append(L"://"); + if (wusername) { +- wcsncat(target, wusername, ARRAY_SIZE(target)); +- wcsncat(target, L"@", ARRAY_SIZE(target)); ++ target_append(wusername); ++ target_append(L"@"); + } + if (host) +- wcsncat(target, host, ARRAY_SIZE(target)); ++ target_append(host); + if (path) { +- wcsncat(target, L"/", ARRAY_SIZE(target)); +- wcsncat(target, path, ARRAY_SIZE(target)); ++ target_append(L"/"); ++ target_append(path); + } + + if (!strcmp(argv[1], "get")) +-- +2.50.1 +
meta/recipes-devtools/git/git_2.35.7.bb +1 -0
@@ -28,6 +28,7 @@ SRC_URI = "${KERNELORG_MIRROR}/software/scm/git/git-${PV}.tar.gz;name=tarball \ file://CVE-2024-52006.patch \ file://CVE-2025-27614-CVE-2025-27613-CVE-2025-46334-CVE-2025-46835.patch \ file://CVE-2025-48384.patch \ + file://CVE-2025-48386.patch \ " S = "${WORKDIR}/git-${PV}"
Signature · 1 line
2.43.0
PATCH 4/4 lz4: patch CVE-2025-62813
In reply to Steve SakomanFrom: Peter Marko <[email protected]>
Pick commit mentioned in NVD report.
--- .../lz4/files/CVE-2025-62813.patch | 69 +++++++++++++++++++ meta/recipes-support/lz4/lz4_1.9.4.bb | 4 +- 2 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-support/lz4/files/CVE-2025-62813.patch
meta/recipes-support/lz4/files/CVE-2025-62813.patch new file +69 -0
@@ -0,0 +1,69 @@ +From f64efec011c058bd70348576438abac222fe6c82 Mon Sep 17 00:00:00 2001 +From: louislafosse <[email protected]> +Date: Mon, 31 Mar 2025 20:48:52 +0200 +Subject: [PATCH] fix(null) : improve error handlings when passing a null + pointer to some functions from lz4frame + +CVE: CVE-2025-62813 +Upstream-Status: Backport [https://github.com/lz4/lz4/commit/f64efec011c058bd70348576438abac222fe6c82] +Signed-off-by: Peter Marko <[email protected]> +--- + lib/lz4frame.c | 15 +++++++++++++-- + tests/frametest.c | 9 ++++++--- + 2 files changed, 19 insertions(+), 5 deletions(-) + +diff --git a/lib/lz4frame.c b/lib/lz4frame.c +index 85daca7b..c9e4a3cf 100644 +--- a/lib/lz4frame.c ++++ b/lib/lz4frame.c +@@ -530,9 +530,16 @@ LZ4F_CDict* + LZ4F_createCDict_advanced(LZ4F_CustomMem cmem, const void* dictBuffer, size_t dictSize) + { + const char* dictStart = (const char*)dictBuffer; +- LZ4F_CDict* const cdict = (LZ4F_CDict*)LZ4F_malloc(sizeof(*cdict), cmem); ++ LZ4F_CDict* cdict = NULL; ++ + DEBUGLOG(4, "LZ4F_createCDict_advanced"); +- if (!cdict) return NULL; ++ ++ if (!dictStart) ++ return NULL; ++ cdict = (LZ4F_CDict*)LZ4F_malloc(sizeof(*cdict), cmem); ++ if (!cdict) ++ return NULL; ++ + cdict->cmem = cmem; + if (dictSize > 64 KB) { + dictStart += dictSize - 64 KB; +@@ -1429,6 +1436,10 @@ LZ4F_errorCode_t LZ4F_getFrameInfo(LZ4F_dctx* dctx, + LZ4F_frameInfo_t* frameInfoPtr, + const void* srcBuffer, size_t* srcSizePtr) + { ++ assert(dctx != NULL); ++ RETURN_ERROR_IF(frameInfoPtr == NULL, parameter_null); ++ RETURN_ERROR_IF(srcSizePtr == NULL, parameter_null); ++ + LZ4F_STATIC_ASSERT(dstage_getFrameHeader < dstage_storeFrameHeader); + if (dctx->dStage > dstage_storeFrameHeader) { + /* frameInfo already decoded */ +diff --git a/tests/frametest.c b/tests/frametest.c +index de0fe643..90247547 100644 +--- a/tests/frametest.c ++++ b/tests/frametest.c +@@ -589,10 +589,13 @@ int basicTests(U32 seed, double compressibility) + size_t const srcSize = 65 KB; /* must be > 64 KB to avoid short-size optimizations */ + size_t const dstCapacity = LZ4F_compressFrameBound(srcSize, NULL); + size_t cSizeNoDict, cSizeWithDict; +- LZ4F_CDict* const cdict = LZ4F_createCDict(CNBuffer, dictSize); +- if (cdict == NULL) goto _output_error; +- CHECK( LZ4F_createCompressionContext(&cctx, LZ4F_VERSION) ); ++ LZ4F_CDict* cdict = NULL; + ++ CHECK( LZ4F_createCompressionContext(&cctx, LZ4F_VERSION) ); ++ cdict = LZ4F_createCDict(CNBuffer, dictSize); ++ if (cdict == NULL) ++ goto _output_error; ++ + DISPLAYLEVEL(3, "Testing LZ4F_createCDict_advanced : "); + { LZ4F_CDict* const cda = LZ4F_createCDict_advanced(lz4f_cmem_test, CNBuffer, dictSize); + if (cda == NULL) goto _output_error;
meta/recipes-support/lz4/lz4_1.9.4.bb +3 -1
@@ -12,7 +12,9 @@ PE = "1" SRCREV = "5ff839680134437dbf4678f3d0c7b371d84f4964" -SRC_URI = "git://github.com/lz4/lz4.git;branch=release;protocol=https" +SRC_URI = "git://github.com/lz4/lz4.git;branch=release;protocol=https \ + file://CVE-2025-62813.patch \ +" UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>.*)" S = "${WORKDIR}/git"
Signature · 1 line
2.43.0