diff options
| author | Peter Marko <peter.marko@siemens.com> | 2025-10-10 22:51:59 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-10-13 18:01:04 +0100 |
| commit | a590d94c7f57a447ee132f4e4df59e7b4999002c (patch) | |
| tree | d2ac04adf7171eba40d3ad9521e85d11fb1ef5f4 /meta/recipes-devtools/binutils | |
| parent | 932a695838b9e6800267d03ed3bf956dc0e1d932 (diff) | |
| download | poky-a590d94c7f57a447ee132f4e4df59e7b4999002c.tar.gz | |
binutils: patch CVE-2025-11082
Pick patch per link in NVD report.
(From OE-Core rev: 4c72e3bcf1f7898e69d5b0b0d490e550bb96bc0e)
Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.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/0016-CVE-2025-11082.patch | 46 |
2 files changed, 47 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils-2.45.inc b/meta/recipes-devtools/binutils/binutils-2.45.inc index e419d829c2..8ace34495d 100644 --- a/meta/recipes-devtools/binutils/binutils-2.45.inc +++ b/meta/recipes-devtools/binutils/binutils-2.45.inc | |||
| @@ -37,4 +37,5 @@ SRC_URI = "\ | |||
| 37 | file://0013-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch \ | 37 | file://0013-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch \ |
| 38 | file://0014-Remove-duplicate-pe-dll.o-entry-deom-targ_extra_ofil.patch \ | 38 | file://0014-Remove-duplicate-pe-dll.o-entry-deom-targ_extra_ofil.patch \ |
| 39 | file://0015-CVE-2025-11081.patch \ | 39 | file://0015-CVE-2025-11081.patch \ |
| 40 | file://0016-CVE-2025-11082.patch \ | ||
| 40 | " | 41 | " |
diff --git a/meta/recipes-devtools/binutils/binutils/0016-CVE-2025-11082.patch b/meta/recipes-devtools/binutils/binutils/0016-CVE-2025-11082.patch new file mode 100644 index 0000000000..d6d1216114 --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils/0016-CVE-2025-11082.patch | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | From ea1a0737c7692737a644af0486b71e4a392cbca8 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: "H.J. Lu" <hjl.tools@gmail.com> | ||
| 3 | Date: Mon, 22 Sep 2025 15:20:34 +0800 | ||
| 4 | Subject: [PATCH] elf: Don't read beyond .eh_frame section size | ||
| 5 | |||
| 6 | PR ld/33464 | ||
| 7 | * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't read beyond | ||
| 8 | .eh_frame section size. | ||
| 9 | |||
| 10 | Signed-off-by: H.J. Lu <hjl.tools@gmail.com> | ||
| 11 | |||
| 12 | CVE: CVE-2025-11082 | ||
| 13 | Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ea1a0737c7692737a644af0486b71e4a392cbca8] | ||
| 14 | Signed-off-by: Peter Marko <peter.marko@siemens.com> | ||
| 15 | --- | ||
| 16 | bfd/elf-eh-frame.c | 8 ++++++-- | ||
| 17 | 1 file changed, 6 insertions(+), 2 deletions(-) | ||
| 18 | |||
| 19 | diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c | ||
| 20 | index dc0d2e097f5..30bb313489c 100644 | ||
| 21 | --- a/bfd/elf-eh-frame.c | ||
| 22 | +++ b/bfd/elf-eh-frame.c | ||
| 23 | @@ -737,6 +737,7 @@ _bfd_elf_parse_eh_frame (bfd *abfd, struct bfd_link_info *info, | ||
| 24 | if (hdr_id == 0) | ||
| 25 | { | ||
| 26 | unsigned int initial_insn_length; | ||
| 27 | + char *null_byte; | ||
| 28 | |||
| 29 | /* CIE */ | ||
| 30 | this_inf->cie = 1; | ||
| 31 | @@ -753,10 +754,13 @@ _bfd_elf_parse_eh_frame (bfd *abfd, struct bfd_link_info *info, | ||
| 32 | REQUIRE (cie->version == 1 | ||
| 33 | || cie->version == 3 | ||
| 34 | || cie->version == 4); | ||
| 35 | - REQUIRE (strlen ((char *) buf) < sizeof (cie->augmentation)); | ||
| 36 | + null_byte = memchr ((char *) buf, 0, end - buf); | ||
| 37 | + REQUIRE (null_byte != NULL); | ||
| 38 | + REQUIRE ((size_t) (null_byte - (char *) buf) | ||
| 39 | + < sizeof (cie->augmentation)); | ||
| 40 | |||
| 41 | strcpy (cie->augmentation, (char *) buf); | ||
| 42 | - buf = (bfd_byte *) strchr ((char *) buf, '\0') + 1; | ||
| 43 | + buf = (bfd_byte *) null_byte + 1; | ||
| 44 | this_inf->u.cie.aug_str_len = buf - start - 1; | ||
| 45 | ENSURE_NO_RELOCS (buf); | ||
| 46 | if (buf[0] == 'e' && buf[1] == 'h') | ||
