summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.45.inc1
-rw-r--r--meta/recipes-devtools/binutils/binutils/CVE-2025-11412.patch35
2 files changed, 36 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils-2.45.inc b/meta/recipes-devtools/binutils/binutils-2.45.inc
index 2adff3c456..ffd6c3b238 100644
--- a/meta/recipes-devtools/binutils/binutils-2.45.inc
+++ b/meta/recipes-devtools/binutils/binutils-2.45.inc
@@ -40,4 +40,5 @@ SRC_URI = "\
40 file://0016-CVE-2025-11082.patch \ 40 file://0016-CVE-2025-11082.patch \
41 file://0017-CVE-2025-11083.patch \ 41 file://0017-CVE-2025-11083.patch \
42 file://CVE-2025-11414.patch \ 42 file://CVE-2025-11414.patch \
43 file://CVE-2025-11412.patch \
43" 44"
diff --git a/meta/recipes-devtools/binutils/binutils/CVE-2025-11412.patch b/meta/recipes-devtools/binutils/binutils/CVE-2025-11412.patch
new file mode 100644
index 0000000000..ab718f5354
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/CVE-2025-11412.patch
@@ -0,0 +1,35 @@
1From 047435dd988a3975d40c6626a8f739a0b2e154bc Mon Sep 17 00:00:00 2001
2From: Alan Modra <amodra@gmail.com>
3Date: Thu, 25 Sep 2025 08:22:24 +0930
4Subject: [PATCH] PR 33452 SEGV in bfd_elf_gc_record_vtentry
5
6Limit addends on vtentry relocs, otherwise ld might attempt to
7allocate a stupidly large array. This also fixes the expression
8overflow leading to pr33452. A vtable of 33M entries on a 64-bit
9host is surely large enough, especially considering that VTINHERIT
10and VTENTRY relocations are to support -fvtable-gc that disappeared
11from gcc over 20 years ago.
12
13 PR ld/33452
14 * elflink.c (bfd_elf_gc_record_vtentry): Sanity check addend.
15
16CVE: CVE-2025-11412
17Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=047435dd988a3975d40c6626a8f739a0b2e154bc]
18Signed-off-by: Peter Marko <peter.marko@siemens.com>
19---
20 bfd/elflink.c | 2 +-
21 1 file changed, 1 insertion(+), 1 deletion(-)
22
23diff --git a/bfd/elflink.c b/bfd/elflink.c
24index 54f0d6e957e..0a0456177c2 100644
25--- a/bfd/elflink.c
26+++ b/bfd/elflink.c
27@@ -14837,7 +14837,7 @@ bfd_elf_gc_record_vtentry (bfd *abfd, asection *sec,
28 const struct elf_backend_data *bed = get_elf_backend_data (abfd);
29 unsigned int log_file_align = bed->s->log_file_align;
30
31- if (!h)
32+ if (!h || addend > 1u << 28)
33 {
34 /* xgettext:c-format */
35 _bfd_error_handler (_("%pB: section '%pA': corrupt VTENTRY entry"),