diff options
| -rw-r--r-- | meta/recipes-devtools/binutils/binutils-2.38.inc | 1 | ||||
| -rw-r--r-- | meta/recipes-devtools/binutils/binutils/0046-CVE-2025-11081.patch | 84 |
2 files changed, 85 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils-2.38.inc b/meta/recipes-devtools/binutils/binutils-2.38.inc index 2e978edc6f..2444a304be 100644 --- a/meta/recipes-devtools/binutils/binutils-2.38.inc +++ b/meta/recipes-devtools/binutils/binutils-2.38.inc | |||
| @@ -82,5 +82,6 @@ SRC_URI = "\ | |||
| 82 | file://0043-CVE-2025-7545.patch \ | 82 | file://0043-CVE-2025-7545.patch \ |
| 83 | file://0044-CVE-2025-11082.patch \ | 83 | file://0044-CVE-2025-11082.patch \ |
| 84 | file://0045-CVE-2025-11083.patch \ | 84 | file://0045-CVE-2025-11083.patch \ |
| 85 | file://0046-CVE-2025-11081.patch \ | ||
| 85 | " | 86 | " |
| 86 | S = "${WORKDIR}/git" | 87 | S = "${WORKDIR}/git" |
diff --git a/meta/recipes-devtools/binutils/binutils/0046-CVE-2025-11081.patch b/meta/recipes-devtools/binutils/binutils/0046-CVE-2025-11081.patch new file mode 100644 index 0000000000..31dbef52fa --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils/0046-CVE-2025-11081.patch | |||
| @@ -0,0 +1,84 @@ | |||
| 1 | From f87a66db645caf8cc0e6fc87b0c28c78a38af59b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Alan Modra <amodra@gmail.com> | ||
| 3 | Date: Tue, 9 Sep 2025 18:32:09 +0930 | ||
| 4 | Subject: [PATCH] PR 33406 SEGV in dump_dwarf_section | ||
| 5 | |||
| 6 | Trying to dump .sframe in a PE file results in a segfault accessing | ||
| 7 | elf_section_data. | ||
| 8 | |||
| 9 | * objdump (dump_sframe_section, dump_dwarf_section): Don't access | ||
| 10 | elf_section_type without first checking the file is ELF. | ||
| 11 | --- | ||
| 12 | binutils/objdump.c | 10 ++++++---- | ||
| 13 | 1 file changed, 6 insertions(+), 4 deletions(-) | ||
| 14 | |||
| 15 | Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=f87a66db645caf8cc0e6fc87b0c28c78a38af59b] | ||
| 16 | CVE: CVE-2025-11081 | ||
| 17 | |||
| 18 | Signed-off-by: Alan Modra <amodra@gmail.com> | ||
| 19 | Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> | ||
| 20 | |||
| 21 | diff --git a/binutils/objdump.c b/binutils/objdump.c | ||
| 22 | index 290f7e51f66..ee8823da05a 100644 | ||
| 23 | --- a/binutils/objdump.c | ||
| 24 | +++ b/binutils/objdump.c | ||
| 25 | @@ -4418,6 +4418,10 @@ | ||
| 26 | else | ||
| 27 | match = name; | ||
| 28 | |||
| 29 | + if (bfd_get_flavour (abfd) == bfd_target_elf_flavour | ||
| 30 | + && elf_section_type (section) == SHT_GNU_SFRAME) | ||
| 31 | + match = ".sframe"; | ||
| 32 | + | ||
| 33 | for (i = 0; i < max; i++) | ||
| 34 | if ((strcmp (debug_displays [i].section.uncompressed_name, match) == 0 | ||
| 35 | || strcmp (debug_displays [i].section.compressed_name, match) == 0 | ||
| 36 | @@ -4923,6 +4927,36 @@ | ||
| 37 | } | ||
| 38 | |||
| 39 | +static void | ||
| 40 | +dump_sframe_section (bfd *abfd, const char *sect_name, bool is_mainfile) | ||
| 41 | + | ||
| 42 | +{ | ||
| 43 | + /* Error checking for user provided SFrame section name, if any. */ | ||
| 44 | + if (sect_name) | ||
| 45 | + { | ||
| 46 | + asection *sec = bfd_get_section_by_name (abfd, sect_name); | ||
| 47 | + if (sec == NULL) | ||
| 48 | + { | ||
| 49 | + printf (_("No %s section present\n\n"), sanitize_string (sect_name)); | ||
| 50 | + return; | ||
| 51 | + } | ||
| 52 | + /* Starting with Binutils 2.45, SFrame sections have section type | ||
| 53 | + SHT_GNU_SFRAME. For SFrame sections from Binutils 2.44 or earlier, | ||
| 54 | + check explcitly for SFrame sections of type SHT_PROGBITS and name | ||
| 55 | + ".sframe" to allow them. */ | ||
| 56 | + else if (bfd_get_flavour (abfd) != bfd_target_elf_flavour | ||
| 57 | + || (elf_section_type (sec) != SHT_GNU_SFRAME | ||
| 58 | + && !(elf_section_type (sec) == SHT_PROGBITS | ||
| 59 | + && strcmp (sect_name, ".sframe") == 0))) | ||
| 60 | + { | ||
| 61 | + printf (_("Section %s does not contain SFrame data\n\n"), | ||
| 62 | + sanitize_string (sect_name)); | ||
| 63 | + return; | ||
| 64 | + } | ||
| 65 | + } | ||
| 66 | + dump_dwarf (abfd, is_mainfile); | ||
| 67 | +} | ||
| 68 | + | ||
| 69 | static void | ||
| 70 | dump_target_specific (bfd *abfd) | ||
| 71 | { | ||
| 72 | const struct objdump_private_desc * const *desc; | ||
| 73 | diff --git a/include/elf/common.h b/include/elf/common.h | ||
| 74 | --- a/include/elf/common.h | ||
| 75 | +++ b/include/elf/common.h | ||
| 76 | @@ -528,6 +528,8 @@ | ||
| 77 | #define SHT_LOOS 0x60000000 /* First of OS specific semantics */ | ||
| 78 | #define SHT_HIOS 0x6fffffff /* Last of OS specific semantics */ | ||
| 79 | |||
| 80 | +#define SHT_GNU_SFRAME 0x6ffffff4 /* SFrame stack trace information. */ | ||
| 81 | + | ||
| 82 | #define SHT_GNU_INCREMENTAL_INPUTS 0x6fff4700 /* incremental build data */ | ||
| 83 | #define SHT_GNU_ATTRIBUTES 0x6ffffff5 /* Object attributes */ | ||
| 84 | #define SHT_GNU_HASH 0x6ffffff6 /* GNU style symbol hash table */ | ||
