diff options
| author | Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com> | 2025-12-16 01:08:35 -0800 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2025-12-31 07:49:31 -0800 |
| commit | c65b128458b108c5ec14ca91f693fd41ba521c22 (patch) | |
| tree | 10962ad67bd7a2897fa702c87ba9113dbeec4e74 /meta | |
| parent | de3a6b0d2493dfed08c494b608230a6f7fa06f38 (diff) | |
| download | poky-c65b128458b108c5ec14ca91f693fd41ba521c22.tar.gz | |
binutils: Fix CVE-2025-11494
Since x86 .eh_frame section may reference _GLOBAL_OFFSET_TABLE_, keep
_GLOBAL_OFFSET_TABLE_ if there is dynamic section and the output
.eh_frame section is non-empty.
Backport a patch from upstream to fix CVE-2025-11494
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=b6ac5a8a5b82f0ae6a4642c8d7149b325f4cc60a]
(From OE-Core rev: e087881bece2884f8d1a3c6d0dd7d69b40eb6732)
Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/recipes-devtools/binutils/binutils-2.42.inc | 1 | ||||
| -rw-r--r-- | meta/recipes-devtools/binutils/binutils/0028-CVE-2025-11494.patch | 43 |
2 files changed, 44 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils-2.42.inc b/meta/recipes-devtools/binutils/binutils-2.42.inc index 60b0d03ccd..69c5eddefb 100644 --- a/meta/recipes-devtools/binutils/binutils-2.42.inc +++ b/meta/recipes-devtools/binutils/binutils-2.42.inc | |||
| @@ -66,5 +66,6 @@ SRC_URI = "\ | |||
| 66 | file://CVE-2025-11414.patch \ | 66 | file://CVE-2025-11414.patch \ |
| 67 | file://CVE-2025-11412.patch \ | 67 | file://CVE-2025-11412.patch \ |
| 68 | file://CVE-2025-11413.patch \ | 68 | file://CVE-2025-11413.patch \ |
| 69 | file://0028-CVE-2025-11494.patch \ | ||
| 69 | " | 70 | " |
| 70 | S = "${WORKDIR}/git" | 71 | S = "${WORKDIR}/git" |
diff --git a/meta/recipes-devtools/binutils/binutils/0028-CVE-2025-11494.patch b/meta/recipes-devtools/binutils/binutils/0028-CVE-2025-11494.patch new file mode 100644 index 0000000000..dc4b413658 --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils/0028-CVE-2025-11494.patch | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | From: "H.J. Lu" <hjl.tools@gmail.com> | ||
| 2 | Date: Tue, 30 Sep 2025 08:13:56 +0800 | ||
| 3 | |||
| 4 | Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=b6ac5a8a5b82f0ae6a4642c8d7149b325f4cc60a] | ||
| 5 | CVE: CVE-2025-11494 | ||
| 6 | |||
| 7 | Since x86 .eh_frame section may reference _GLOBAL_OFFSET_TABLE_, keep | ||
| 8 | _GLOBAL_OFFSET_TABLE_ if there is dynamic section and the output | ||
| 9 | .eh_frame section is non-empty. | ||
| 10 | |||
| 11 | PR ld/33499 | ||
| 12 | * elfxx-x86.c (_bfd_x86_elf_late_size_sections): Keep | ||
| 13 | _GLOBAL_OFFSET_TABLE_ if there is dynamic section and the | ||
| 14 | output .eh_frame section is non-empty. | ||
| 15 | |||
| 16 | Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com> | ||
| 17 | |||
| 18 | diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c | ||
| 19 | index c054f7cd..ddc15945 100644 | ||
| 20 | --- a/bfd/elfxx-x86.c | ||
| 21 | +++ b/bfd/elfxx-x86.c | ||
| 22 | @@ -2447,6 +2447,8 @@ _bfd_x86_elf_late_size_sections (bfd *output_bfd, | ||
| 23 | |||
| 24 | if (htab->elf.sgotplt) | ||
| 25 | { | ||
| 26 | + asection *eh_frame; | ||
| 27 | + | ||
| 28 | /* Don't allocate .got.plt section if there are no GOT nor PLT | ||
| 29 | entries and there is no reference to _GLOBAL_OFFSET_TABLE_. */ | ||
| 30 | if ((htab->elf.hgot == NULL | ||
| 31 | @@ -2459,7 +2461,11 @@ _bfd_x86_elf_late_size_sections (bfd *output_bfd, | ||
| 32 | && (htab->elf.iplt == NULL | ||
| 33 | || htab->elf.iplt->size == 0) | ||
| 34 | && (htab->elf.igotplt == NULL | ||
| 35 | - || htab->elf.igotplt->size == 0)) | ||
| 36 | + || htab->elf.igotplt->size == 0) | ||
| 37 | + && (!htab->elf.dynamic_sections_created | ||
| 38 | + || (eh_frame = bfd_get_section_by_name (output_bfd, | ||
| 39 | + ".eh_frame")) == NULL | ||
| 40 | + || eh_frame->rawsize == 0)) | ||
| 41 | { | ||
| 42 | htab->elf.sgotplt->size = 0; | ||
| 43 | /* Solaris requires to keep _GLOBAL_OFFSET_TABLE_ even if it | ||
