]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
binutils: patch CVE-2025-11082
authorPeter Marko <peter.marko@siemens.com>
Mon, 13 Oct 2025 19:07:30 +0000 (21:07 +0200)
committerSteve Sakoman <steve@sakoman.com>
Mon, 13 Oct 2025 19:47:59 +0000 (12:47 -0700)
Pick patch per link in NVD report.

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/recipes-devtools/binutils/binutils-2.42.inc
meta/recipes-devtools/binutils/binutils/0024-CVE-2025-11082.patch [new file with mode: 0644]

index e791cd2b1360b9675c721c9cf6d27512d2ebf092..a879a1b501b7326d9c7355cecb7757b47204a7db 100644 (file)
@@ -59,5 +59,6 @@ SRC_URI = "\
      file://0022-CVE-2025-5244.patch \
      file://0023-CVE-2025-7546.patch \
      file://0023-CVE-2025-7545.patch \
+     file://0024-CVE-2025-11082.patch \
 "
 S  = "${WORKDIR}/git"
diff --git a/meta/recipes-devtools/binutils/binutils/0024-CVE-2025-11082.patch b/meta/recipes-devtools/binutils/binutils/0024-CVE-2025-11082.patch
new file mode 100644 (file)
index 0000000..d712a62
--- /dev/null
@@ -0,0 +1,46 @@
+From ea1a0737c7692737a644af0486b71e4a392cbca8 Mon Sep 17 00:00:00 2001
+From: "H.J. Lu" <hjl.tools@gmail.com>
+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 <hjl.tools@gmail.com>
+
+CVE: CVE-2025-11082
+Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ea1a0737c7692737a644af0486b71e4a392cbca8]
+Signed-off-by: Peter Marko <peter.marko@siemens.com>
+---
+ 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 dc0d2e097f5..30bb313489c 100644
+--- a/bfd/elf-eh-frame.c
++++ b/bfd/elf-eh-frame.c
+@@ -734,6 +734,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;
+@@ -750,10 +751,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')