summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Marko <peter.marko@siemens.com>2025-11-02 12:58:34 +0100
committerSteve Sakoman <steve@sakoman.com>2025-11-07 06:54:41 -0800
commitef4b31498d01e003117767fe2c1308f37c43080a (patch)
treeab6030a0e50a9152c1fb361e2bd2db6fa6cb02e3
parent97f732ce9b914ea4022c9425611c16d333c2787b (diff)
downloadpoky-ef4b31498d01e003117767fe2c1308f37c43080a.tar.gz
binutils: patch CVE-2025-11414
Pick commit per NVD CVE report. (From OE-Core rev: cd7ce80fa1a99916aa2f93c4d9591c5496c3ef71) (From OE-Core rev: ddb6453a751efb2c07b0866a1aace9d4adb55089) Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.42.inc1
-rw-r--r--meta/recipes-devtools/binutils/binutils/CVE-2025-11414.patch84
2 files changed, 85 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils-2.42.inc b/meta/recipes-devtools/binutils/binutils-2.42.inc
index dcd3325ecc..21f0f7e3a7 100644
--- a/meta/recipes-devtools/binutils/binutils-2.42.inc
+++ b/meta/recipes-devtools/binutils/binutils-2.42.inc
@@ -63,5 +63,6 @@ SRC_URI = "\
63 file://0025-CVE-2025-11083.patch \ 63 file://0025-CVE-2025-11083.patch \
64 file://0026-CVE-2025-11081.patch \ 64 file://0026-CVE-2025-11081.patch \
65 file://0027-CVE-2025-8225.patch \ 65 file://0027-CVE-2025-8225.patch \
66 file://CVE-2025-11414.patch \
66" 67"
67S = "${WORKDIR}/git" 68S = "${WORKDIR}/git"
diff --git a/meta/recipes-devtools/binutils/binutils/CVE-2025-11414.patch b/meta/recipes-devtools/binutils/binutils/CVE-2025-11414.patch
new file mode 100644
index 0000000000..c6e45c3091
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/CVE-2025-11414.patch
@@ -0,0 +1,84 @@
1From aeaaa9af6359c8e394ce9cf24911fec4f4d23703 Mon Sep 17 00:00:00 2001
2From: "H.J. Lu" <hjl.tools@gmail.com>
3Date: Tue, 23 Sep 2025 08:52:26 +0800
4Subject: [PATCH] elf: Return error on unsorted symbol table if not allowed
5
6Normally ELF symbol table should be sorted, i.e., local symbols precede
7global symbols. Irix 6 is an exception and its elf_bad_symtab is set
8to true. Issue an error if elf_bad_symtab is false and symbol table is
9unsorted.
10
11 PR ld/33450
12 * elflink.c (set_symbol_value): Change return type to bool and
13 return false on error. Issue an error on unsorted symbol table
14 if not allowed.
15 (elf_link_input_bfd): Return false if set_symbol_value reurns
16 false.
17
18Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
19
20CVE: CVE-2025-11414
21Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=aeaaa9af6359c8e394ce9cf24911fec4f4d23703]
22Signed-off-by: Peter Marko <peter.marko@siemens.com>
23---
24 bfd/elflink.c | 21 +++++++++++++++------
25 1 file changed, 15 insertions(+), 6 deletions(-)
26
27diff --git a/bfd/elflink.c b/bfd/elflink.c
28index 66982f82b94..54f0d6e957e 100644
29--- a/bfd/elflink.c
30+++ b/bfd/elflink.c
31@@ -8914,7 +8914,7 @@ struct elf_outext_info
32 <binary-operator> := as in C
33 <unary-operator> := as in C, plus "0-" for unambiguous negation. */
34
35-static void
36+static bool
37 set_symbol_value (bfd *bfd_with_globals,
38 Elf_Internal_Sym *isymbuf,
39 size_t locsymcount,
40@@ -8935,9 +8935,15 @@ set_symbol_value (bfd *bfd_with_globals,
41 "absolute" section and give it a value. */
42 sym->st_shndx = SHN_ABS;
43 sym->st_value = val;
44- return;
45+ return true;
46+ }
47+ if (!elf_bad_symtab (bfd_with_globals))
48+ {
49+ _bfd_error_handler (_("%pB: corrupt symbol table"),
50+ bfd_with_globals);
51+ bfd_set_error (bfd_error_bad_value);
52+ return false;
53 }
54- BFD_ASSERT (elf_bad_symtab (bfd_with_globals));
55 extsymoff = 0;
56 }
57
58@@ -8947,11 +8953,12 @@ set_symbol_value (bfd *bfd_with_globals,
59 if (h == NULL)
60 {
61 /* FIXMEL What should we do ? */
62- return;
63+ return false;
64 }
65 h->root.type = bfd_link_hash_defined;
66 h->root.u.def.value = val;
67 h->root.u.def.section = bfd_abs_section_ptr;
68+ return true;
69 }
70
71 static bool
72@@ -11641,8 +11648,10 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd)
73 return false;
74
75 /* Symbol evaluated OK. Update to absolute value. */
76- set_symbol_value (input_bfd, isymbuf, locsymcount,
77- r_symndx, val);
78+ if (!set_symbol_value (input_bfd, isymbuf, locsymcount, r_symndx,
79+ val))
80+ return false;
81+
82 continue;
83 }
84