binutils CVE fixes for CVE-2026-91781, CVE-2026-91782 and CVE-2026-90828 for scarthgap
cover binutils CVE fixes for CVE-2026-91781, CVE-2026-91782 and CVE-2026-90828 for scarthgap
Jaipaul Cheernam (3):
binutils: Patch CVE-2026-91781
binutils: Patch for CVE-2026-90828
binutils: Patch for CVE-2026-91782
.../binutils/binutils-2.42.inc | 9 + .../binutils/CVE-2026-90828-pre.patch | 30 ++ .../binutils/binutils/CVE-2026-90828.patch | 29 ++ .../binutils/binutils/CVE-2026-91781.patch | 36 ++ .../binutils/binutils/CVE-2026-91782-1.patch | 80 ++++ .../binutils/CVE-2026-91782-2-pre.patch | 161 +++++++ .../binutils/binutils/CVE-2026-91782-2.patch | 430 ++++++++++++++++++ .../binutils/binutils/CVE-2026-91782-3.patch | 132 ++++++ .../binutils/binutils/CVE-2026-91782-4.patch | 49 ++ .../binutils/binutils/CVE-2026-91782-5.patch | 67 +++ 10 files changed, 1023 insertions(+) create mode 100644 meta/recipes-devtools/binutils/binutils/CVE-2026-90828-pre.patch create mode 100644 meta/recipes-devtools/binutils/binutils/CVE-2026-90828.patch create mode 100644 meta/recipes-devtools/binutils/binutils/CVE-2026-91781.patch create mode 100644 meta/recipes-devtools/binutils/binutils/CVE-2026-91782-1.patch create mode 100644 meta/recipes-devtools/binutils/binutils/CVE-2026-91782-2-pre.patch create mode 100644 meta/recipes-devtools/binutils/binutils/CVE-2026-91782-2.patch create mode 100644 meta/recipes-devtools/binutils/binutils/CVE-2026-91782-3.patch create mode 100644 meta/recipes-devtools/binutils/binutils/CVE-2026-91782-4.patch create mode 100644 meta/recipes-devtools/binutils/binutils/CVE-2026-91782-5.patch
PATCH 1/3 binutils: Patch CVE-2026-91781
NVD[1] lists only 2.47, but PoC ([3], attachment 16881) reproduces the SEGV on 2.42 and 2.46 too. So, backported fix from [2] to 2.42
References:
[1] https://nvd.nist.gov/vuln/detail/cve-2026-91781
[2] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7322e9bc30cb282575a701c307851fd3d66fee68
[3] https://sourceware.org/bugzilla/show_bug.cgi?id=34449
--- .../binutils/binutils-2.42.inc | 1 + .../binutils/binutils/CVE-2026-91781.patch | 36 +++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 meta/recipes-devtools/binutils/binutils/CVE-2026-91781.patch
meta/recipes-devtools/binutils/binutils-2.42.inc +1 -0
@@ -84,5 +84,6 @@ SRC_URI = "\ file://CVE-2026-18220.patch \ file://CVE-2026-3441_CVE-2026-3442.patch \ file://CVE-2026-4647.patch \ + file://CVE-2026-91781.patch \ " S = "${WORKDIR}/git"
meta/recipes-devtools/binutils/binutils/CVE-2026-91781.patch new file +36 -0
@@ -0,0 +1,36 @@ +From 03e5dab2f6f1b3ccc151722f189642614fa09f13 Mon Sep 17 00:00:00 2001 +From: "H.J. Lu" <[email protected]> +Date: Thu, 30 Jul 2026 15:47:05 +0800 +Subject: [PATCH] x86-64: Return SHN_COMMON on non-ELF input + +elf_x86_64_common_definition segfaults on PE/x86-64 input. Return +SHN_COMMON on non-ELF input. Linker now gets assertion fail at +bfd/coffgen.c:575, instead of getting segfault. + + PR ld/34449 + * elf64-x86-64.c (elf_x86_64_common_definition): Return + SHN_COMMON on non-ELF input. + +Signed-off-by: H.J. Lu <[email protected]> + +CVE: CVE-2026-91781 +Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7322e9bc30cb282575a701c307851fd3d66fee68] +Signed-off-by: Jaipaul Cheernam <[email protected]> +--- + bfd/elf64-x86-64.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c +index abf97b2dde5..0d1ef1d38bc 100644 +--- a/bfd/elf64-x86-64.c ++++ b/bfd/elf64-x86-64.c +@@ -5518,7 +5518,8 @@ elf_x86_64_common_definition (Elf_Internal_Sym *sym) + static unsigned int + elf_x86_64_common_section_index (asection *sec) + { +- if ((elf_section_flags (sec) & SHF_X86_64_LARGE) == 0) ++ if (bfd_get_flavour (sec->owner) != bfd_target_elf_flavour ++ || (elf_section_flags (sec) & SHF_X86_64_LARGE) == 0) + return SHN_COMMON; + else + return SHN_X86_64_LCOMMON;
PATCH 2/3 binutils: Patch for CVE-2026-90828
In reply to Jaipaul Cheernambackport fix mentioned in [2] for CVE [1]
Actual fix need a prerequisite commit [4] CVE-2026-90828-pre.patch
References:
[1] https://nvd.nist.gov/vuln/detail/cve-2026-90828
[2] https://sourceware.org/bugzilla/show_bug.cgi?id=34450
[3] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=123e4a5eab2db300b44288dcc1a29c903f9622f9
[4] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=6be6e5b8ee95eda6f12f5bb0fbc2a17a42265ffb
--- .../binutils/binutils-2.42.inc | 2 ++ .../binutils/CVE-2026-90828-pre.patch | 30 +++++++++++++++++++ .../binutils/binutils/CVE-2026-90828.patch | 29 ++++++++++++++++++ 3 files changed, 61 insertions(+) create mode 100644 meta/recipes-devtools/binutils/binutils/CVE-2026-90828-pre.patch create mode 100644 meta/recipes-devtools/binutils/binutils/CVE-2026-90828.patch
meta/recipes-devtools/binutils/binutils-2.42.inc +2 -0
@@ -85,5 +85,7 @@ SRC_URI = "\ file://CVE-2026-3441_CVE-2026-3442.patch \ file://CVE-2026-4647.patch \ file://CVE-2026-91781.patch \ + file://CVE-2026-90828-pre.patch \ + file://CVE-2026-90828.patch \ " S = "${WORKDIR}/git"
meta/recipes-devtools/binutils/binutils/CVE-2026-90828-pre.patch new file +30 -0
@@ -0,0 +1,30 @@ +From b7c4d0bb673d8d53367e085999f5303d63025e8b Mon Sep 17 00:00:00 2001 +From: Nick Clifton <[email protected]> +Date: Thu, 6 Feb 2025 09:55:03 +0000 +Subject: [PATCH] Fix illegal memory access when linking a corrupt input file. + +PR 32647 + +CVE: CVE-2026-90828 +Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=6be6e5b8ee95eda6f12f5bb0fbc2a17a42265ffb] + +Note: NVD didn't mark this as prerequisite but while cherry-picking the fix to resolve this commit is needed +my analysis this check is needed + +Signed-off-by: Jaipaul Cheernam <[email protected]> +--- + ld/ldelf.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/ld/ldelf.c b/ld/ldelf.c +index d8c0817b..314e72a9 100644 +--- a/ld/ldelf.c ++++ b/ld/ldelf.c +@@ -2089,6 +2089,7 @@ elf_orphan_compatible (asection *in, asection *out) + && (elf_next_in_group (out) != NULL + || ((elf_section_flags (in) & SHF_LINK_ORDER) != 0 + && (elf_section_flags (out) & SHF_LINK_ORDER) != 0 ++ && elf_linked_to_section (in) != NULL + && (elf_linked_to_section (in)->output_section + != elf_linked_to_section (out)->output_section)) + || ((elf_section_flags (out) ^ elf_section_flags (in))
meta/recipes-devtools/binutils/binutils/CVE-2026-90828.patch new file +29 -0
@@ -0,0 +1,29 @@ +From f6c82e420be28ae30caa49bfb095b576924f1f95 Mon Sep 17 00:00:00 2001 +From: Alan Modra <[email protected]> +Date: Tue, 22 Sep 2026 21:27:03 +0930 +Subject: [PATCH] PR 34450 SEGV in elf_orphan_compatible + +Don't trust that SHF_LINK_ORDER set means linked_to is non-NULL. + + * ldelf.c (elf_orphan_compatible): Sanity check linked_to before + dereferencing. + +CVE: CVE-2026-90828 +Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=123e4a5eab2db300b44288dcc1a29c903f9622f9] +Signed-off-by: Jaipaul Cheernam <[email protected]> +--- + ld/ldelf.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/ld/ldelf.c b/ld/ldelf.c +index 314e72a9..7529cf47 100644 +--- a/ld/ldelf.c ++++ b/ld/ldelf.c +@@ -2090,6 +2090,7 @@ elf_orphan_compatible (asection *in, asection *out) + || ((elf_section_flags (in) & SHF_LINK_ORDER) != 0 + && (elf_section_flags (out) & SHF_LINK_ORDER) != 0 + && elf_linked_to_section (in) != NULL ++ && elf_linked_to_section (out) != NULL + && (elf_linked_to_section (in)->output_section + != elf_linked_to_section (out)->output_section)) + || ((elf_section_flags (out) ^ elf_section_flags (in))
PATCH 3/3 binutils: Patch for CVE-2026-91782
In reply to Jaipaul CheernamNVD [1] points 5 commits (mentioned below from [2] to [6]) as fix for this CVE
[7] is prerequisite for [3]
[1] https://nvd.nist.gov/vuln/detail/cve-2026-91782
[2] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d1268210b6f6eddd267a4ebe4b7d36b802af628d
[3] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=471130b39c03623ec6d78ece377ff4da3f6bfe7b
[4] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=283d3198beda5110a8417fd09b336a34bbd2705c
[5] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0a84e5602163e9f95a6f137ced28aff0507ce790
[6] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a692a633d407995a5ce87e84a0b1032e9ac51360
[7] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6b21c8b2ecfef5c95142cbc2c32f185cb1c26ab0
--- .../binutils/binutils-2.42.inc | 6 + .../binutils/binutils/CVE-2026-91782-1.patch | 80 ++++ .../binutils/CVE-2026-91782-2-pre.patch | 161 +++++++ .../binutils/binutils/CVE-2026-91782-2.patch | 430 ++++++++++++++++++ .../binutils/binutils/CVE-2026-91782-3.patch | 132 ++++++ .../binutils/binutils/CVE-2026-91782-4.patch | 49 ++ .../binutils/binutils/CVE-2026-91782-5.patch | 67 +++ 7 files changed, 925 insertions(+) create mode 100644 meta/recipes-devtools/binutils/binutils/CVE-2026-91782-1.patch create mode 100644 meta/recipes-devtools/binutils/binutils/CVE-2026-91782-2-pre.patch create mode 100644 meta/recipes-devtools/binutils/binutils/CVE-2026-91782-2.patch create mode 100644 meta/recipes-devtools/binutils/binutils/CVE-2026-91782-3.patch create mode 100644 meta/recipes-devtools/binutils/binutils/CVE-2026-91782-4.patch create mode 100644 meta/recipes-devtools/binutils/binutils/CVE-2026-91782-5.patch
meta/recipes-devtools/binutils/binutils-2.42.inc +6 -0
@@ -87,5 +87,11 @@ SRC_URI = "\ file://CVE-2026-91781.patch \ file://CVE-2026-90828-pre.patch \ file://CVE-2026-90828.patch \ + file://CVE-2026-91782-1.patch \ + file://CVE-2026-91782-2-pre.patch \ + file://CVE-2026-91782-2.patch \ + file://CVE-2026-91782-3.patch \ + file://CVE-2026-91782-4.patch \ + file://CVE-2026-91782-5.patch \ " S = "${WORKDIR}/git"
meta/recipes-devtools/binutils/binutils/CVE-2026-91782-1.patch new file +80 -0
80 lines not on this page · raw message
meta/recipes-devtools/binutils/binutils/CVE-2026-91782-2-pre.patch new file +161 -0
161 lines not on this page · raw message
meta/recipes-devtools/binutils/binutils/CVE-2026-91782-2.patch new file +430 -0
430 lines not on this page · raw message
meta/recipes-devtools/binutils/binutils/CVE-2026-91782-3.patch new file +132 -0
132 lines not on this page · raw message
meta/recipes-devtools/binutils/binutils/CVE-2026-91782-4.patch new file +49 -0
49 lines not on this page · raw message
meta/recipes-devtools/binutils/binutils/CVE-2026-91782-5.patch new file +67 -0
67 lines not on this page · raw message