binutils: fix CVE-2025-69649, and CVE-2025-69652
PATCH 1/1 binutils: fix CVE-2025-69649, and CVE-2025-69652
CVE-2025-69649:
Null pointer dereference in readelf before 2.46 results in segfault when processing a crafted ELF binary with malformed header fields. No evidence of memory corruption beyond the null pointer dereference, nor any possibility of code execution, was observed.
CVE-2025-69652:
Null pointer dereference in readelf when processing a crafted ELF binary with malformed DWARF abbrev or debug information which leads to SIGABORT. No evidence of memory corruption or code execution was observed; the impact is limited to denial of service.
--- .../binutils/binutils-2.42.inc | 2 + .../binutils/binutils/CVE-2025-69649.patch | 36 +++++++++++++++++ .../binutils/binutils/CVE-2025-69652.patch | 39 +++++++++++++++++++ 3 files changed, 77 insertions(+) create mode 100644 meta/recipes-devtools/binutils/binutils/CVE-2025-69649.patch create mode 100644 meta/recipes-devtools/binutils/binutils/CVE-2025-69652.patch
meta/recipes-devtools/binutils/binutils-2.42.inc +2 -0
@@ -74,5 +74,7 @@ SRC_URI = "\ file://0030-CVE-2025-11840.patch \ file://CVE-2025-69647.patch \ file://CVE-2025-69648.patch \ + file://CVE-2025-69649.patch \ + file://CVE-2025-69652.patch \ " S = "${WORKDIR}/git"
meta/recipes-devtools/binutils/binutils/CVE-2025-69649.patch new file +36 -0
@@ -0,0 +1,36 @@ +From 9d26af3871d5b8f8dd9c6b17987845e1f774eac4 Mon Sep 17 00:00:00 2001 +From: Alan Modra <[email protected]> +Date: Mon, 8 Dec 2025 15:58:33 +1030 +Subject: [PATCH] PR 33697, fuzzer segfault + + PR 33697 + * readelf.c (process_relocs): Don't segfault on no sections. + +CVE: CVE-2025-69649 +Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=66a3492ce68e1ae45b2489bd9a815c39ea5d7f66] + +Signed-off-by: Roland Kovacs <[email protected]> +--- + binutils/readelf.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/binutils/readelf.c b/binutils/readelf.c +index 5e4ad6ea6ad..8c1987ffaec 100644 +--- a/binutils/readelf.c ++++ b/binutils/readelf.c +@@ -8961,9 +8961,9 @@ process_relocs (Filedata * filedata) + size_t i; + bool found = false; + +- for (i = 0, section = filedata->section_headers; +- i < filedata->file_header.e_shnum; +- i++, section++) ++ section = filedata->section_headers; ++ if (section != NULL) ++ for (i = 0; i < filedata->file_header.e_shnum; i++, section++) + { + if ( section->sh_type != SHT_RELA + && section->sh_type != SHT_REL +-- +2.34.1 +
meta/recipes-devtools/binutils/binutils/CVE-2025-69652.patch new file +39 -0
@@ -0,0 +1,39 @@ +From 034627143b85563fe4b4e416422d9dea8e66bd6f Mon Sep 17 00:00:00 2001 +From: Alan Modra <[email protected]> +Date: Mon, 8 Dec 2025 16:04:44 +1030 +Subject: [PATCH] PR 33701, abort in byte_get_little_endian + + PR 33701 + * dwarf.c (process_debug_info): Set debug_info_p NULL when + DEBUG_INFO_UNAVAILABLE. + +CVE: CVE-2025-69652 +Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=44b79abd0fa12e7947252eb4c6e5d16ed6033e01] + +Signed-off-by: Roland Kovacs <[email protected]> +--- + binutils/dwarf.c | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/binutils/dwarf.c b/binutils/dwarf.c +index 615e051b2bf..13b11b46e41 100644 +--- a/binutils/dwarf.c ++++ b/binutils/dwarf.c +@@ -4222,9 +4222,11 @@ process_debug_info (struct dwarf_section * section, + break; + } + +- debug_info *debug_info_p = +- (debug_information && unit < alloc_num_debug_info_entries) +- ? debug_information + unit : NULL; ++ debug_info *debug_info_p = NULL; ++ if (debug_information ++ && num_debug_info_entries != DEBUG_INFO_UNAVAILABLE ++ && unit < alloc_num_debug_info_entries) ++ debug_info_p = debug_information + unit; + + assert (!debug_info_p + || (debug_info_p->num_loc_offsets +-- +2.34.1 +
Signature · 1 line
2.34.1
Hello,
Quoted 62 lines · Roland Kovács via lists.openembedded.org
CVE-2025-69649:
Null pointer dereference in readelf before 2.46 results in segfault when processing a crafted ELF binary with malformed header fields. No evidence of memory corruption beyond the null pointer dereference, nor any possibility of code execution, was observed.CVE-2025-69652:
Null pointer dereference in readelf when processing a crafted ELF binary with malformed DWARF abbrev or debug information which leads to SIGABORT. No evidence of memory corruption or code execution was observed; the impact is limited to denial of service.Signed-off-by Roland Kovacs <[email protected]>--- .../binutils/binutils-2.42.inc | 2 + .../binutils/binutils/CVE-2025-69649.patch | 36 +++++++++++++++++ .../binutils/binutils/CVE-2025-69652.patch | 39 +++++++++++++++++++ 3 files changed, 77 insertions(+) create mode 100644 meta/recipes-devtools/binutils/binutils/CVE-2025-69649.patch create mode 100644 meta/recipes-devtools/binutils/binutils/CVE-2025-69652.patchmeta/recipes-devtools/binutils/binutils-2.42.inc +2
-0@@ -74,5 +74,7 @@ SRC_URI = "\ file://0030-CVE-2025-11840.patch \ file://CVE-2025-69647.patch \ file://CVE-2025-69648.patch \ + file://CVE-2025-69649.patch \ + file://CVE-2025-69652.patch \ " S = "${WORKDIR}/git"meta/recipes-devtools/binutils/binutils/CVE-2025-69649.patch new file +23
-0@@ -0,0 +1,36 @@ +From 9d26af3871d5b8f8dd9c6b17987845e1f774eac4 Mon Sep 17 00:00:00 2001 +From: Alan Modra <[email protected]> +Date: Mon, 8 Dec 2025 15:58:33 +1030 +Subject: [PATCH] PR 33697, fuzzer segfault + + PR 33697 + * readelf.c (process_relocs): Don't segfault on no sections. + +CVE: CVE-2025-69649 +Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=66a3492ce68e1ae45b2489bd9a815c39ea5d7f66] + +Signed-off-by: Roland Kovacs <[email protected]> +--- + binutils/readelf.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/binutils/readelf.c b/binutils/readelf.c +index 5e4ad6ea6ad..8c1987ffaec 100644 +--- a/binutils/readelf.c ++++ b/binutils/readelf.c +@@ -8961,9 +8961,9 @@ process_relocs (Filedata * filedata) + size_t i; + bool found = false;
meta/recipes-devtools/binutils/binutils/CVE-2025-69649.patch line 33
Quoted 10 lines
meta/recipes-devtools/binutils/binutils/CVE-2025-69649.patch new file +10
-0+ +- for (i = 0, section = filedata->section_headers; +- i < filedata->file_header.e_shnum; +- i++, section++) ++ section = filedata->section_headers; ++ if (section != NULL) ++ for (i = 0; i < filedata->file_header.e_shnum; i++, section++) + { + if ( section->sh_type != SHT_RELA + && section->sh_type != SHT_REL
This backport is sensibly different from the upstream commit. Upstream has a short for loop but your patch is at the start of a really long one!
Can you justify why your backport is safe & correct?
Thanks!
Signature · 2 lines
Yoann Congal Smile ECS
Quoted 84 lines · Yoann Congal
Hello,
Quoted 66 lines · Roland Kovács via lists.openembedded.org
CVE-2025-69649:
Null pointer dereference in readelf before 2.46 results in segfault when processing a crafted ELF binary with malformed header fields. No evidence of memory corruption beyond the null pointer dereference, nor any possibility of code execution, was observed.CVE-2025-69652:
Null pointer dereference in readelf when processing a crafted ELF binary with malformed DWARF abbrev or debug information which leads to SIGABORT. No evidence of memory corruption or code execution was observed; the impact is limited to denial of service.Signed-off-by Roland Kovacs <[email protected]>---
.../binutils/binutils-2.42.inc | 2 + .../binutils/binutils/CVE-2025-69649.patch | 36 +++++++++++++++++ .../binutils/binutils/CVE-2025-69652.patch | 39 +++++++++++++++++++3 files changed, 77 insertions(+)create mode 100644
meta/recipes-devtools/binutils/binutils/CVE-2025-69649.patchcreate mode 100644meta/recipes-devtools/binutils/binutils/CVE-2025-69652.patchmeta/recipes- renamed from meta/recipes-devtools/binutils/binutils-2.42.inc +0
-0devtools/binutils/binutils-2.42.inc
index1a865c45f4..da954fc138100644meta/recipes-devtools/binutils/binutils-2.42.inc +2
-0@@ -74,5 +74,7 @@ SRC_URI = "\ file://0030-CVE-2025-11840.patch \ file://CVE-2025-69647.patch \ file://CVE-2025-69648.patch \ + file://CVE-2025-69649.patch \ + file://CVE-2025-69652.patch \"
S = "${WORKDIR}/git"meta/recipes- renamed from meta/recipes-devtools/binutils/binutils/CVE-2025-69649.patch +0
-0
devtools/binutils/binutils/CVE-2025-69649.patch
new file mode 100644
index 0000000000..4865ad6535meta/recipes-devtools/binutils/binutils/CVE-2025-69649.patch new file +10
-0@@ -0,0 +1,36 @@ +From 9d26af3871d5b8f8dd9c6b17987845e1f774eac4 Mon Sep 17 00:00:00 2001 +From: Alan Modra <[email protected]> +Date: Mon, 8 Dec 2025 15:58:33 +1030 +Subject: [PATCH] PR 33697, fuzzer segfault + + PR 33697 + * readelf.c (process_relocs): Don't segfault on no sections. + +CVE: CVE-2025-69649 +Upstream-Status: Backport[https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=66a3492ce68e1ae45b2489bd9a815c39ea5d
7f66]meta/recipes-devtools/binutils/binutils/CVE-2025-69649.patch new file +13
-0+ +Signed-off-by: Roland Kovacs <[email protected]> +--- + binutils/readelf.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/binutils/readelf.c b/binutils/readelf.c +index 5e4ad6ea6ad..8c1987ffaec 100644 +--- a/binutils/readelf.c ++++ b/binutils/readelf.c +@@ -8961,9 +8961,9 @@ process_relocs (Filedata * filedata) + size_t i; + bool found = false;meta/recipes-devtools/binutils/binutils/CVE-2025-69649.patch line 33
Quoted 10 lines
meta/recipes-devtools/binutils/binutils/CVE-2025-69649.patch new file +10
-0+ +- for (i = 0, section = filedata->section_headers; +- i < filedata->file_header.e_shnum; +- i++, section++) ++ section = filedata->section_headers; ++ if (section != NULL) ++ for (i = 0; i < filedata->file_header.e_shnum; i++, section++) + { + if ( section->sh_type != SHT_RELA + && section->sh_type != SHT_RELThis backport is sensibly different from the upstream commit. Upstream has a short for loop but your patch is at the start of a really long one!
Quoted 3 lines
Can you justify why your backport is safe & correct?
Thanks!
Yes, on 2.42 the formatted printing of relocations is in-line, while on 2.46 that code mostly has been moved into 'display_relocations()' as part of 8e8d0b63ff15896cc2c228c01f18dfcf2a4a9305. See:
https://sourceware.org/git/?p=binutils-gdb.git;a=blobdiff;f=binutils/readelf.c;h=fa0de3a7e0d9c2acc18fe047a7019e09f1ce3894;hp=c1006480b7bc3e83dd87fb20d215342375614af9;hb=8e8d0b63ff15896cc2c228c01f18dfcf2a4a9305;hpb=31c21e2c13d85793b525f74aa911eb28700ed89c
Cheers,
Roland
Quoted 85 lines · Roland Kovács
Quoted 84 lines · Yoann Congal
Hello,
Quoted 66 lines · Roland Kovács via lists.openembedded.org
CVE-2025-69649:
Null pointer dereference in readelf before 2.46 results in segfault when processing a crafted ELF binary with malformed header fields. No evidence of memory corruption beyond the null pointer dereference, nor any possibility of code execution, was observed.CVE-2025-69652:
Null pointer dereference in readelf when processing a crafted ELF binary with malformed DWARF abbrev or debug information which leads to SIGABORT. No evidence of memory corruption or code execution was observed; the impact is limited to denial of service.Signed-off-by Roland Kovacs <[email protected]>---
.../binutils/binutils-2.42.inc | 2 + .../binutils/binutils/CVE-2025-69649.patch | 36 +++++++++++++++++ .../binutils/binutils/CVE-2025-69652.patch | 39 +++++++++++++++++++3 files changed, 77 insertions(+)create mode 100644
meta/recipes-devtools/binutils/binutils/CVE-2025-69649.patchcreate mode 100644meta/recipes-devtools/binutils/binutils/CVE-2025-69652.patchmeta/recipes- renamed from meta/recipes-devtools/binutils/binutils-2.42.inc +0
-0devtools/binutils/binutils-2.42.inc
index1a865c45f4..da954fc138100644meta/recipes-devtools/binutils/binutils-2.42.inc +2
-0@@ -74,5 +74,7 @@ SRC_URI = "\ file://0030-CVE-2025-11840.patch \ file://CVE-2025-69647.patch \ file://CVE-2025-69648.patch \ + file://CVE-2025-69649.patch \ + file://CVE-2025-69652.patch \"
S = "${WORKDIR}/git"meta/recipes- renamed from meta/recipes-devtools/binutils/binutils/CVE-2025-69649.patch +0
-0
devtools/binutils/binutils/CVE-2025-69649.patch
new file mode 100644
index 0000000000..4865ad6535meta/recipes-devtools/binutils/binutils/CVE-2025-69649.patch new file +10
-0@@ -0,0 +1,36 @@ +From 9d26af3871d5b8f8dd9c6b17987845e1f774eac4 Mon Sep 17 00:00:00 2001 +From: Alan Modra <[email protected]> +Date: Mon, 8 Dec 2025 15:58:33 +1030 +Subject: [PATCH] PR 33697, fuzzer segfault + + PR 33697 + * readelf.c (process_relocs): Don't segfault on no sections. + +CVE: CVE-2025-69649 +Upstream-Status: Backport[https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=66a3492ce68e1ae45b2489bd9a815c39ea5d
7f66]meta/recipes-devtools/binutils/binutils/CVE-2025-69649.patch new file +13
-0+ +Signed-off-by: Roland Kovacs <[email protected]> +--- + binutils/readelf.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/binutils/readelf.c b/binutils/readelf.c +index 5e4ad6ea6ad..8c1987ffaec 100644 +--- a/binutils/readelf.c ++++ b/binutils/readelf.c +@@ -8961,9 +8961,9 @@ process_relocs (Filedata * filedata) + size_t i; + bool found = false;meta/recipes-devtools/binutils/binutils/CVE-2025-69649.patch line 33
Quoted 10 lines
meta/recipes-devtools/binutils/binutils/CVE-2025-69649.patch new file +10
-0+ +- for (i = 0, section = filedata->section_headers; +- i < filedata->file_header.e_shnum; +- i++, section++) ++ section = filedata->section_headers; ++ if (section != NULL) ++ for (i = 0; i < filedata->file_header.e_shnum; i++, section++) + { + if ( section->sh_type != SHT_RELA + && section->sh_type != SHT_RELThis backport is sensibly different from the upstream commit. Upstream has a short for loop but your patch is at the start of a really long one!
Quoted 8 lines
Quoted 3 lines
Can you justify why your backport is safe & correct?
Thanks!
Yes, on 2.42 the formatted printing of relocations is in-line, while on 2.46 that code mostly has been moved into '
display_relocations()' as part of8e8d0b63ff15896cc2c228c01f18dfcf2a4a9305. See:
https://sourceware.org/git/?p=binutils-gdb.git;a=blobdiff;f=binutils/readelf.c;h=fa0de3a7e0d9c2acc18fe047a7019e09f1ce3894;hp=c1006480b7bc3e83dd87fb20d215342375614af9;hb=8e8d0b63ff15896cc2c228c01f18dfcf2a4a9305;hpb=31c21e2c13d85793b525f74aa911eb28700ed89c
This is a good explanation, can you add it to the CVE-2025-69649 patch with the line you added (ie the "CVE: ", "Upstream-status:", ... lines)?
Thanks!
Quoted 3 lines
Cheers,
Roland
Signature · 2 lines
Yoann Congal Smile ECS
Quoted 98 lines · Yoann Congal
Quoted 89 lines · Roland Kovács
Quoted 88 lines · Yoann Congal
Hello,
Quoted 68 lines · Roland Kovács via lists.openembedded.org
CVE-2025-69649:
Null pointer dereference in readelf before 2.46 results in segfault when processing a crafted ELF binary with malformed header fields. No evidence of memory corruption beyond the null pointer dereference, nor any possibility of code execution, was observed.CVE-2025-69652:
Null pointer dereference in readelf when processing a crafted ELF binary with malformed DWARF abbrev or debug information which leads to SIGABORT. No evidence of memory corruption or code execution was observed; the impact is limited to denial of service.Signed-off-by Roland Kovacs <[email protected]>---
.../binutils/binutils-2.42.inc | 2 + .../binutils/binutils/CVE-2025-69649.patch | 36 +++++++++++++++++ .../binutils/binutils/CVE-2025-69652.patch | 39 +++++++++++++++++++3 files changed, 77 insertions(+)create mode 100644
meta/recipes-devtools/binutils/binutils/CVE-2025-69649.patchcreate mode 100644meta/recipes-devtools/binutils/binutils/CVE-2025-69652.patchmeta/recipes- renamed from meta/recipes-devtools/binutils/binutils-2.42.inc +0
-0devtools/binutils/binutils-2.42.inc
index1a865c45f4..da954fc138100644meta/recipes-devtools/binutils/binutils-2.42.inc +2
-0@@ -74,5 +74,7 @@ SRC_URI = "\ file://0030-CVE-2025-11840.patch \ file://CVE-2025-69647.patch \ file://CVE-2025-69648.patch \ + file://CVE-2025-69649.patch \ + file://CVE-2025-69652.patch \"
S = "${WORKDIR}/git"meta/recipes- renamed from meta/recipes-devtools/binutils/binutils/CVE-2025-69649.patch +0
-0
devtools/binutils/binutils/CVE-2025-69649.patch
new file mode 100644
index 0000000000..4865ad6535meta/recipes-devtools/binutils/binutils/CVE-2025-69649.patch new file +10
-0@@ -0,0 +1,36 @@ +From 9d26af3871d5b8f8dd9c6b17987845e1f774eac4 Mon Sep 17 00:00:00 2001 +From: Alan Modra <[email protected]> +Date: Mon, 8 Dec 2025 15:58:33 +1030 +Subject: [PATCH] PR 33697, fuzzer segfault + + PR 33697 + * readelf.c (process_relocs): Don't segfault on no sections. + +CVE: CVE-2025-69649 +Upstream-Status: Backport[
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=66a3492ce68e1ae45b2489bd9a815c39ea
5d
7f66]meta/recipes-devtools/binutils/binutils/CVE-2025-69649.patch new file +13
-0+ +Signed-off-by: Roland Kovacs <[email protected]> +--- + binutils/readelf.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/binutils/readelf.c b/binutils/readelf.c +index 5e4ad6ea6ad..8c1987ffaec 100644 +--- a/binutils/readelf.c ++++ b/binutils/readelf.c +@@ -8961,9 +8961,9 @@ process_relocs (Filedata * filedata) + size_t i; + bool found = false;meta/recipes-devtools/binutils/binutils/CVE-2025-69649.patch line 33
Quoted 10 lines
meta/recipes-devtools/binutils/binutils/CVE-2025-69649.patch new file +10
-0+ +- for (i = 0, section = filedata->section_headers; +- i < filedata->file_header.e_shnum; +- i++, section++) ++ section = filedata->section_headers; ++ if (section != NULL) ++ for (i = 0; i < filedata->file_header.e_shnum; i++, section++) + { + if ( section->sh_type != SHT_RELA + && section->sh_type != SHT_RELThis backport is sensibly different from the upstream commit. Upstream has a short for loop but your patch is at the start of a really long one!
Can you justify why your backport is safe & correct?
Quoted 7 lines
Quoted 1 line
Thanks!
Yes, on 2.42 the formatted printing of relocations is in-line, while on 2.46 that code mostly has
been moved into 'display_relocations()' as part of8e8d0b63ff15896cc2c228c01f18dfcf2a4a9305. See:
https://sourceware.org/git/?p=binutils-gdb.git;a=blobdiff;f=binutils/readelf.c;h=fa0de3a7e0d9c2acc18fe047a7019e09f1ce3894;hp=c1006480b7bc3e83dd87fb20d215342375614af9;hb=8e8d0b63ff15896cc2c228c01f18dfcf2a4a9305;hpb=31c21e2c13d85793b525f74aa911eb28700ed89c
Quoted 5 lines
This is a good explanation, can you add it to the CVE-2025-69649 patch with the line you added (ie the "CVE: ", "Upstream-status:", ... lines)?
Thanks!
I see it already pulled in on -nut:
https://git.openembedded.org/openembedded-core-contrib/commit/?h=stable/scarthgap-nut&id=3c3635eed24731a99d0cc9a3570415cd4b096433
Do you want a v2 and fixup on nut, or just a patch on top of the pushed commit to add the extra info?
Quoted 4 lines
Quoted 3 lines
Cheers,
Roland
Quoted 102 lines · Roland Kovács
Quoted 101 lines · Yoann Congal
Quoted 89 lines · Roland Kovács
Quoted 88 lines · Yoann Congal
Hello,
Quoted 68 lines · Roland Kovács via lists.openembedded.org
CVE-2025-69649:
Null pointer dereference in readelf before 2.46 results in segfault when processing a crafted ELF binary with malformed header fields. No evidence of memory corruption beyond the null pointer dereference, nor any possibility of code execution, was observed.CVE-2025-69652:
Null pointer dereference in readelf when processing a crafted ELF binary with malformed DWARF abbrev or debug information which leads to SIGABORT. No evidence of memory corruption or code execution was observed; the impact is limited to denial of service.Signed-off-by Roland Kovacs <[email protected]>---
.../binutils/binutils-2.42.inc | 2 + .../binutils/binutils/CVE-2025-69649.patch | 36 +++++++++++++++++ .../binutils/binutils/CVE-2025-69652.patch | 39 +++++++++++++++++++3 files changed, 77 insertions(+)create mode 100644
meta/recipes-devtools/binutils/binutils/CVE-2025-69649.patchcreate mode 100644meta/recipes-devtools/binutils/binutils/CVE-2025-69652.patchmeta/recipes- renamed from meta/recipes-devtools/binutils/binutils-2.42.inc +0
-0devtools/binutils/binutils-2.42.inc
index1a865c45f4..da954fc138100644meta/recipes-devtools/binutils/binutils-2.42.inc +2
-0@@ -74,5 +74,7 @@ SRC_URI = "\ file://0030-CVE-2025-11840.patch \ file://CVE-2025-69647.patch \ file://CVE-2025-69648.patch \ + file://CVE-2025-69649.patch \ + file://CVE-2025-69652.patch \"
S = "${WORKDIR}/git"meta/recipes- renamed from meta/recipes-devtools/binutils/binutils/CVE-2025-69649.patch +0
-0
devtools/binutils/binutils/CVE-2025-69649.patch
new file mode 100644
index 0000000000..4865ad6535meta/recipes-devtools/binutils/binutils/CVE-2025-69649.patch new file +10
-0@@ -0,0 +1,36 @@ +From 9d26af3871d5b8f8dd9c6b17987845e1f774eac4 Mon Sep 17 00:00:00 2001 +From: Alan Modra <[email protected]> +Date: Mon, 8 Dec 2025 15:58:33 +1030 +Subject: [PATCH] PR 33697, fuzzer segfault + + PR 33697 + * readelf.c (process_relocs): Don't segfault on no sections. + +CVE: CVE-2025-69649 +Upstream-Status: Backport[
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=66a3492ce68e1ae45b2489bd9a815c39ea
5d
7f66]meta/recipes-devtools/binutils/binutils/CVE-2025-69649.patch new file +13
-0+ +Signed-off-by: Roland Kovacs <[email protected]> +--- + binutils/readelf.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/binutils/readelf.c b/binutils/readelf.c +index 5e4ad6ea6ad..8c1987ffaec 100644 +--- a/binutils/readelf.c ++++ b/binutils/readelf.c +@@ -8961,9 +8961,9 @@ process_relocs (Filedata * filedata) + size_t i; + bool found = false;meta/recipes-devtools/binutils/binutils/CVE-2025-69649.patch line 33
Quoted 10 lines
meta/recipes-devtools/binutils/binutils/CVE-2025-69649.patch new file +10
-0+ +- for (i = 0, section = filedata->section_headers; +- i < filedata->file_header.e_shnum; +- i++, section++) ++ section = filedata->section_headers; ++ if (section != NULL) ++ for (i = 0; i < filedata->file_header.e_shnum; i++, section++) + { + if ( section->sh_type != SHT_RELA + && section->sh_type != SHT_RELThis backport is sensibly different from the upstream commit. Upstream has a short for loop but your patch is at the start of a really long one!
Can you justify why your backport is safe & correct?
Quoted 7 lines
Quoted 1 line
Thanks!
Yes, on 2.42 the formatted printing of relocations is in-line, while on 2.46 that code mostly has
been moved into 'display_relocations()' as part of8e8d0b63ff15896cc2c228c01f18dfcf2a4a9305. See:
https://sourceware.org/git/?p=binutils-gdb.git;a=blobdiff;f=binutils/readelf.c;h=fa0de3a7e0d9c2acc18fe047a7019e09f1ce3894;hp=c1006480b7bc3e83dd87fb20d215342375614af9;hb=8e8d0b63ff15896cc2c228c01f18dfcf2a4a9305;hpb=31c21e2c13d85793b525f74aa911eb28700ed89cThis is a good explanation, can you add it to the CVE-2025-69649 patch with the line you added (ie the "CVE: ", "Upstream-status:", ... lines)?
Quoted 8 lines
Quoted 2 lines
Thanks!
I see it already pulled in on -nut:
https://git.openembedded.org/openembedded-core-contrib/commit/?h=stable/scarthgap-nut&id=3c3635eed24731a99d0cc9a3570415cd4b096433Do you want a v2 and fixup on nut, or just a patch on top of the pushed commit to add the extra info?
A v2 with the fixup integrated into it (ie. 1 patch only) please.
Thanks!
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
Cheers,
Roland
Signature · 2 lines
Yoann Congal Smile ECS