From edd3b677fe5196be418ae1a3ce1bbb03565c989f Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: May 23 2023 11:09:34 +0000 Subject: import devtoolset-12-binutils-2.36.1-6.el7 --- diff --git a/SOURCES/binutils-CVE-2021-3826.patch b/SOURCES/binutils-CVE-2021-3826.patch new file mode 100644 index 0000000..d913dbe --- /dev/null +++ b/SOURCES/binutils-CVE-2021-3826.patch @@ -0,0 +1,11 @@ +--- binutils.orig/libiberty/d-demangle.c 2022-11-30 14:25:36.976876338 +0000 ++++ binutils-2.36.1/libiberty/d-demangle.c 2022-11-30 14:26:37.546690548 +0000 +@@ -380,7 +380,7 @@ dlang_symbol_backref (string *decl, cons + + /* Must point to a simple identifier. */ + backref = dlang_number (backref, &len); +- if (backref == NULL) ++ if (backref == NULL || strlen (backref) < len) + return NULL; + + backref = dlang_lname (decl, backref, len); diff --git a/SOURCES/binutils-CVE-2022-4285.patch b/SOURCES/binutils-CVE-2022-4285.patch new file mode 100644 index 0000000..191e6f1 --- /dev/null +++ b/SOURCES/binutils-CVE-2022-4285.patch @@ -0,0 +1,13 @@ +--- binutils.orig/bfd/elf.c 2022-12-13 15:21:20.040233487 +0000 ++++ binutils-2.39/bfd/elf.c 2022-12-13 15:22:33.580986232 +0000 +@@ -8868,7 +8868,9 @@ _bfd_elf_slurp_version_tables (bfd *abfd + bfd_set_error (bfd_error_file_too_big); + goto error_return_verref; + } +- elf_tdata (abfd)->verref = (Elf_Internal_Verneed *) bfd_alloc (abfd, amt); ++ if (amt == 0) ++ goto error_return_verref; ++ elf_tdata (abfd)->verref = (Elf_Internal_Verneed *) bfd_zalloc (abfd, amt); + if (elf_tdata (abfd)->verref == NULL) + goto error_return_verref; + diff --git a/SPECS/binutils.spec b/SPECS/binutils.spec index e0ffa92..6ab3998 100644 --- a/SPECS/binutils.spec +++ b/SPECS/binutils.spec @@ -5,7 +5,7 @@ Summary: A GNU collection of binary utilities Name: %{?scl_prefix}%{?cross}binutils%{?_with_debug:-debug} Version: 2.36.1 -Release: 4%{?dist} +Release: 6%{?dist} License: GPLv3+ URL: https://sourceware.org/binutils @@ -250,6 +250,14 @@ Patch28: binutils-ppc-weak-undefined-plt-relocs.patch # Lifetime: Fixed in 2.39 Patch29: binutils-bfd-DWARF-improvements.patch +# Purpose: Fix a demangling vulnerability in libiberty. +# Lifetime: Fixed in 2.37 +Patch30: binutils-CVE-2021-3826.patch + +# Purpose: Fix a illegal memory acess parsing corrupt files. +# Lifetime: Fixed in 2.40 +Patch31: binutils-CVE-2022-4285.patch + #---------------------------------------------------------------------------- Provides: bundled(libiberty) @@ -898,6 +906,12 @@ exit 0 #---------------------------------------------------------------------------- %changelog +* Fri Dec 16 2022 Nick Clifton - 2.36.1-6 +- Fix an illegal memory access parsing a corrupt ELF file. (#2153218) + +* Wed Nov 30 2022 Nick Clifton - 2.36.1-5 +- Fix a demangling vulnerability in libiberty. (#2132592) + * Fri Jul 08 2022 Nick Clifton - 2.36.1-4 - Add the pthread library to the linker command line. (#2102547)