diff --git a/SPECS/gdb/CVE-2025-11082.patch b/SPECS/gdb/CVE-2025-11082.patch new file mode 100644 index 00000000000..89308b00e9f --- /dev/null +++ b/SPECS/gdb/CVE-2025-11082.patch @@ -0,0 +1,47 @@ +From 673292b3f4800cbf9b454513b5e535809e46d1fc Mon Sep 17 00:00:00 2001 +From: "H.J. Lu" +Date: Mon, 22 Sep 2025 15:20:34 +0800 +Subject: [PATCH] elf: Don't read beyond .eh_frame section size + + PR ld/33464 + * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't read beyond + .eh_frame section size. + +Signed-off-by: H.J. Lu +Signed-off-by: Azure Linux Security Servicing Account +Upstream-reference: https://github.com/bminor/binutils-gdb/commit/ea1a0737c7692737a644af0486b71e4a392cbca8.patch +--- + bfd/elf-eh-frame.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c +index 6ce6d22..f1f6b46 100644 +--- a/bfd/elf-eh-frame.c ++++ b/bfd/elf-eh-frame.c +@@ -733,6 +733,7 @@ _bfd_elf_parse_eh_frame (bfd *abfd, struct bfd_link_info *info, + if (hdr_id == 0) + { + unsigned int initial_insn_length; ++ char *null_byte; + + /* CIE */ + this_inf->cie = 1; +@@ -749,10 +750,13 @@ _bfd_elf_parse_eh_frame (bfd *abfd, struct bfd_link_info *info, + REQUIRE (cie->version == 1 + || cie->version == 3 + || cie->version == 4); +- REQUIRE (strlen ((char *) buf) < sizeof (cie->augmentation)); ++ null_byte = memchr ((char *) buf, 0, end - buf); ++ REQUIRE (null_byte != NULL); ++ REQUIRE ((size_t) (null_byte - (char *) buf) ++ < sizeof (cie->augmentation)); + + strcpy (cie->augmentation, (char *) buf); +- buf = (bfd_byte *) strchr ((char *) buf, '\0') + 1; ++ buf = (bfd_byte *) null_byte + 1; + this_inf->u.cie.aug_str_len = buf - start - 1; + ENSURE_NO_RELOCS (buf); + if (buf[0] == 'e' && buf[1] == 'h') +-- +2.45.4 + diff --git a/SPECS/gdb/gdb.spec b/SPECS/gdb/gdb.spec index bc2085e58b4..87b57211aa3 100644 --- a/SPECS/gdb/gdb.spec +++ b/SPECS/gdb/gdb.spec @@ -1,7 +1,7 @@ Summary: C debugger Name: gdb Version: 11.2 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv2+ Vendor: Microsoft Corporation Distribution: Mariner @@ -18,6 +18,7 @@ Patch6: CVE-2022-48065.patch Patch7: CVE-2022-47673.patch Patch8: CVE-2022-47696.patch Patch9: CVE-2025-7546.patch +Patch10: CVE-2025-11082.patch BuildRequires: expat-devel BuildRequires: gcc-c++ BuildRequires: gcc-gfortran @@ -102,6 +103,9 @@ rm -rvf libctf/testsuite %{_mandir}/*/* %changelog +* Fri Oct 03 2025 Azure Linux Security Servicing Account - 11.2-8 +- Patch for CVE-2025-11082 + * Fri Jul 18 2025 Akhila Guruju - 11.2-7 - Patch CVE-2025-7546 - Fix package tests