From 74d2642e0764bf96f629f4c9e7d87864ce37bcdf Mon Sep 17 00:00:00 2001 From: AlmaLinux RelEng Bot Date: Tue, 19 May 2026 20:25:37 -0400 Subject: [PATCH] import UBI binutils-2.35.2-72.el9 --- .../binutils-error-on-corrupted-group.patch | 38 +++++++++++++++++++ .../binutils-rwx-seg-execstack-err-warn.patch | 2 +- SPECS/binutils.spec | 18 ++++++++- 3 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 SOURCES/binutils-error-on-corrupted-group.patch diff --git a/SOURCES/binutils-error-on-corrupted-group.patch b/SOURCES/binutils-error-on-corrupted-group.patch new file mode 100644 index 0000000..9527ad4 --- /dev/null +++ b/SOURCES/binutils-error-on-corrupted-group.patch @@ -0,0 +1,38 @@ +From 41461010eb7c79fee7a9d5f6209accdaac66cc6b Mon Sep 17 00:00:00 2001 +From: "H.J. Lu" +Date: Sat, 21 Jun 2025 06:52:00 +0800 +Subject: [PATCH] elf: Report corrupted group section + +Report corrupted group section instead of trying to recover. + + PR binutils/33050 + * elf.c (bfd_elf_set_group_contents): Report corrupted group + section. + +Signed-off-by: H.J. Lu +--- + bfd/elf.c | 23 ++++++++++------------- + 1 file changed, 10 insertions(+), 13 deletions(-) + +--- binutils.orig/bfd/elf.c 2025-12-16 12:33:34.627390340 +0000 ++++ binutils-2.35.2/bfd/elf.c 2025-12-16 12:36:53.274123682 +0000 +@@ -3667,8 +3667,18 @@ bfd_elf_set_group_contents (bfd *abfd, a + break; + } + ++ /* We should always get here with loc == sec->contents + 4. Return ++ an error for bogus SHT_GROUP sections. */ + loc -= 4; +- BFD_ASSERT (loc == sec->contents); ++ if (loc != sec->contents) ++ { ++ /* xgettext:c-format */ ++ _bfd_error_handler (_("%pB: corrupted group section: `%pA'"), ++ abfd, sec); ++ bfd_set_error (bfd_error_bad_value); ++ *failedptr = TRUE; ++ return; ++ } + + H_PUT_32 (abfd, sec->flags & SEC_LINK_ONCE ? GRP_COMDAT : 0, loc); + } diff --git a/SOURCES/binutils-rwx-seg-execstack-err-warn.patch b/SOURCES/binutils-rwx-seg-execstack-err-warn.patch index 0a8cfb8..323d294 100644 --- a/SOURCES/binutils-rwx-seg-execstack-err-warn.patch +++ b/SOURCES/binutils-rwx-seg-execstack-err-warn.patch @@ -1809,7 +1809,7 @@ diff -rupN binutils.orig/ld/testsuite/ld-powerpc/ppc476-shared2.d binutils-2.35. DYNAMIC RELOCATION RECORDS -OFFSET TYPE VALUE -+OFFSET +TYPE +VALUE ++OFFSET +TYPE +VALUE.* 0001000[02] R_PPC_ADDR16_LO \.text\+0x00050000 0002000[02] R_PPC_ADDR16_LO \.text\+0x00050000 0003000[02] R_PPC_ADDR16_LO \.text\+0x00050000 diff --git a/SPECS/binutils.spec b/SPECS/binutils.spec index a5c35d2..9b7e8e2 100644 --- a/SPECS/binutils.spec +++ b/SPECS/binutils.spec @@ -2,7 +2,7 @@ Summary: A GNU collection of binary utilities Name: binutils%{?_with_debug:-debug} Version: 2.35.2 -Release: 67%{?dist}.1 +Release: 72%{?dist} License: GPLv3+ URL: https://sourceware.org/binutils @@ -538,6 +538,11 @@ Patch106: binutils-execstack-error-tests.patch # Lifetime: Fixed in 2.46 Patch107: binutils-CVE-2025-11083.patch +# Purpose: Stops a potential illegal memory access when copying a corrupt +# input file. PR 33050 +# Lifetime: Fixed in 2.46 +Patch108: binutils-error-on-corrupted-group.patch + #---------------------------------------------------------------------------- Provides: bundled(libiberty) @@ -1397,9 +1402,18 @@ exit 0 #---------------------------------------------------------------------------- %changelog -* Mon Nov 24 2025 Nick Clifton - 2.35.2-67.1 +* Mon Jan 19 2026 Nick Clifton - 2.35.2-72 +- Fix a potential illegal memory access when copying a corrupt input file. (RHEL-142281) + +* Tue Dec 16 2025 Nick Clifton - 2.35.2-71 +- Fix a potential illegal memory access when copying a corrupt input file. (RHEL-132287) + +* Tue Nov 11 2025 Nick Clifton - 2.35.2-69 - Fix a potential illegal memory access when linking a corrupt input file. (RHEL-126883) +* Wed Sep 10 2025 Nick Clifton - 2.35.2-68 +- Add missing space to ppc476-shared2 linker test. (RHEL-113842) + * Tue Aug 19 2025 Nick Clifton - 2.35.2-67 - Adds tests for the linker's --error-execstack and --error-rwx-segments command line options. (RHEL-109970)