binutils CVE fixes for CVE-2026-91781, CVE-2026-91782 and CVE-2026-90828
cover binutils CVE fixes for CVE-2026-91781, CVE-2026-91782 and CVE-2026-90828
- Same patches will be backported to blacksail onces its merged to master
Jaipaul Cheernam (3):
binutils: Patch CVE-2026-91781
binutils: Patch for CVE-2026-90828
binutils: Patch for CVE-2026-91782
.../binutils/binutils-2.47.inc | 7 + .../binutils/binutils/CVE-2026-90828.patch | 29 ++ .../binutils/binutils/CVE-2026-91781.patch | 36 ++ .../binutils/binutils/CVE-2026-91782-1.patch | 80 ++++ .../binutils/binutils/CVE-2026-91782-2.patch | 424 ++++++++++++++++++ .../binutils/binutils/CVE-2026-91782-3.patch | 130 ++++++ .../binutils/binutils/CVE-2026-91782-4.patch | 50 +++ .../binutils/binutils/CVE-2026-91782-5.patch | 65 +++ 8 files changed, 821 insertions(+) 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.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.47
binutils-testsuite summary:
binutils: 336 tests passed, 0 expected failures, 5 untested, 7 unsupported.
gas: 2,098 tests passed, 0 expected failures, 0 untested, 4 unsupported.
ld: 2,710 tests passed, 59 expected failures, 4 untested, 339 unsupported.
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.47.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.47.inc +1 -0
@@ -38,4 +38,5 @@ SRC_URI = "\ file://0012-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch \ file://0013-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch \ file://0014-Remove-duplicate-pe-dll.o-entry-deom-targ_extra_ofil.patch \ + file://CVE-2026-91781.patch \ "
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 [3] fix mentioned in [2] for CVE [1]
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
--- .../binutils/binutils-2.47.inc | 1 + .../binutils/binutils/CVE-2026-90828.patch | 29 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 meta/recipes-devtools/binutils/binutils/CVE-2026-90828.patch
meta/recipes-devtools/binutils/binutils-2.47.inc +1 -0
@@ -39,4 +39,5 @@ SRC_URI = "\ file://0013-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch \ file://0014-Remove-duplicate-pe-dll.o-entry-deom-targ_extra_ofil.patch \ file://CVE-2026-91781.patch \ + file://CVE-2026-90828.patch \ "
meta/recipes-devtools/binutils/binutils/CVE-2026-90828.patch new file +29 -0
@@ -0,0 +1,29 @@ +From a8d25ed8b1ac9d8e47fcce90cb901bacf863074c 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 3d36e033b0c..50eb8d18799 100644 +--- a/ld/ldelf.c ++++ b/ld/ldelf.c +@@ -2087,6 +2087,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
[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
--- .../binutils/binutils-2.47.inc | 5 + .../binutils/binutils/CVE-2026-91782-1.patch | 80 ++++ .../binutils/binutils/CVE-2026-91782-2.patch | 424 ++++++++++++++++++ .../binutils/binutils/CVE-2026-91782-3.patch | 130 ++++++ .../binutils/binutils/CVE-2026-91782-4.patch | 50 +++ .../binutils/binutils/CVE-2026-91782-5.patch | 65 +++ 6 files changed, 754 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.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.47.inc +5 -0
@@ -40,4 +40,9 @@ SRC_URI = "\ file://0014-Remove-duplicate-pe-dll.o-entry-deom-targ_extra_ofil.patch \ file://CVE-2026-91781.patch \ file://CVE-2026-90828.patch \ + file://CVE-2026-91782-1.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 \ "
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.patch new file +424 -0
424 lines not on this page · raw message
meta/recipes-devtools/binutils/binutils/CVE-2026-91782-3.patch new file +130 -0
130 lines not on this page · raw message
meta/recipes-devtools/binutils/binutils/CVE-2026-91782-4.patch new file +50 -0
50 lines not on this page · raw message
meta/recipes-devtools/binutils/binutils/CVE-2026-91782-5.patch new file +65 -0
65 lines not on this page · raw message