diff options
| author | Peter Marko <peter.marko@siemens.com> | 2025-10-21 00:09:08 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-10-27 11:37:43 +0000 |
| commit | 241b6711792924ba3a6ad8b565f21435fd70d4de (patch) | |
| tree | 2d3f9dfa33648b1b013569d012ea0516c13ec579 /meta/recipes-devtools/binutils | |
| parent | 3fd806ff4024707a2a22a05b7b1cf5c04f486adc (diff) | |
| download | poky-241b6711792924ba3a6ad8b565f21435fd70d4de.tar.gz | |
binutils: patch CVE-2025-11414
Pick commit per NVD CVE report.
(From OE-Core rev: cd7ce80fa1a99916aa2f93c4d9591c5496c3ef71)
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>
Diffstat (limited to 'meta/recipes-devtools/binutils')
| -rw-r--r-- | meta/recipes-devtools/binutils/binutils-2.45.inc | 1 | ||||
| -rw-r--r-- | meta/recipes-devtools/binutils/binutils/CVE-2025-11414.patch | 84 |
2 files changed, 85 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils-2.45.inc b/meta/recipes-devtools/binutils/binutils-2.45.inc index 391b0157d3..2adff3c456 100644 --- a/meta/recipes-devtools/binutils/binutils-2.45.inc +++ b/meta/recipes-devtools/binutils/binutils-2.45.inc | |||
| @@ -39,4 +39,5 @@ SRC_URI = "\ | |||
| 39 | file://0015-CVE-2025-11081.patch \ | 39 | file://0015-CVE-2025-11081.patch \ |
| 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 | " | 43 | " |
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..21f98f075e --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils/CVE-2025-11414.patch | |||
| @@ -0,0 +1,84 @@ | |||
| 1 | From aeaaa9af6359c8e394ce9cf24911fec4f4d23703 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: "H.J. Lu" <hjl.tools@gmail.com> | ||
| 3 | Date: Tue, 23 Sep 2025 08:52:26 +0800 | ||
| 4 | Subject: [PATCH] elf: Return error on unsorted symbol table if not allowed | ||
| 5 | |||
| 6 | Normally ELF symbol table should be sorted, i.e., local symbols precede | ||
| 7 | global symbols. Irix 6 is an exception and its elf_bad_symtab is set | ||
| 8 | to true. Issue an error if elf_bad_symtab is false and symbol table is | ||
| 9 | unsorted. | ||
| 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 | |||
| 18 | Signed-off-by: H.J. Lu <hjl.tools@gmail.com> | ||
| 19 | |||
| 20 | CVE: CVE-2025-11414 | ||
| 21 | Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=aeaaa9af6359c8e394ce9cf24911fec4f4d23703] | ||
| 22 | Signed-off-by: Peter Marko <peter.marko@siemens.com> | ||
| 23 | --- | ||
| 24 | bfd/elflink.c | 21 +++++++++++++++------ | ||
| 25 | 1 file changed, 15 insertions(+), 6 deletions(-) | ||
| 26 | |||
| 27 | diff --git a/bfd/elflink.c b/bfd/elflink.c | ||
| 28 | index 66982f82b94..54f0d6e957e 100644 | ||
| 29 | --- a/bfd/elflink.c | ||
| 30 | +++ b/bfd/elflink.c | ||
| 31 | @@ -9127,7 +9127,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 | @@ -9148,9 +9148,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 | @@ -9160,11 +9166,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 | @@ -11862,8 +11869,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 | |||
