diff options
| author | Peter Marko <peter.marko@siemens.com> | 2025-11-02 12:58:35 +0100 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2025-11-07 06:54:41 -0800 |
| commit | ca2c8b88be669cb70538771add78ae4c64d920ec (patch) | |
| tree | e864b916a7246744ae82589ce69a07c33ecc4093 | |
| parent | ef4b31498d01e003117767fe2c1308f37c43080a (diff) | |
| download | poky-ca2c8b88be669cb70538771add78ae4c64d920ec.tar.gz | |
binutils: patch CVE-2025-11412
Pick commit per NVD CVE report.
(From OE-Core rev: 6b94ff6c584a31d2b1e06d1e1dc19392d759b4b7)
(From OE-Core rev: fdbcbb0fe92a862a993108609eb4107e34eeeed2)
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.inc | 1 | ||||
| -rw-r--r-- | meta/recipes-devtools/binutils/binutils/CVE-2025-11412.patch | 35 |
2 files changed, 36 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils-2.42.inc b/meta/recipes-devtools/binutils/binutils-2.42.inc index 21f0f7e3a7..b13c31717d 100644 --- a/meta/recipes-devtools/binutils/binutils-2.42.inc +++ b/meta/recipes-devtools/binutils/binutils-2.42.inc | |||
| @@ -64,5 +64,6 @@ SRC_URI = "\ | |||
| 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 | file://CVE-2025-11414.patch \ |
| 67 | file://CVE-2025-11412.patch \ | ||
| 67 | " | 68 | " |
| 68 | S = "${WORKDIR}/git" | 69 | S = "${WORKDIR}/git" |
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..e2a2b10c18 --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils/CVE-2025-11412.patch | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | From 047435dd988a3975d40c6626a8f739a0b2e154bc Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Alan Modra <amodra@gmail.com> | ||
| 3 | Date: Thu, 25 Sep 2025 08:22:24 +0930 | ||
| 4 | Subject: [PATCH] PR 33452 SEGV in bfd_elf_gc_record_vtentry | ||
| 5 | |||
| 6 | Limit addends on vtentry relocs, otherwise ld might attempt to | ||
| 7 | allocate a stupidly large array. This also fixes the expression | ||
| 8 | overflow leading to pr33452. A vtable of 33M entries on a 64-bit | ||
| 9 | host is surely large enough, especially considering that VTINHERIT | ||
| 10 | and VTENTRY relocations are to support -fvtable-gc that disappeared | ||
| 11 | from gcc over 20 years ago. | ||
| 12 | |||
| 13 | PR ld/33452 | ||
| 14 | * elflink.c (bfd_elf_gc_record_vtentry): Sanity check addend. | ||
| 15 | |||
| 16 | CVE: CVE-2025-11412 | ||
| 17 | Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=047435dd988a3975d40c6626a8f739a0b2e154bc] | ||
| 18 | Signed-off-by: Peter Marko <peter.marko@siemens.com> | ||
| 19 | --- | ||
| 20 | bfd/elflink.c | 2 +- | ||
| 21 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 22 | |||
| 23 | diff --git a/bfd/elflink.c b/bfd/elflink.c | ||
| 24 | index 54f0d6e957e..0a0456177c2 100644 | ||
| 25 | --- a/bfd/elflink.c | ||
| 26 | +++ b/bfd/elflink.c | ||
| 27 | @@ -14613,7 +14613,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"), | ||
