diff options
| author | Soumya Sambu <soumya.sambu@windriver.com> | 2025-08-13 17:40:59 +0530 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2025-08-26 06:33:14 -0700 |
| commit | f199f5e3a6c3112e348c60695f3509c21af4e911 (patch) | |
| tree | a16b903c9d3a6ffe7e55534367610133340c92b4 /meta/recipes-devtools | |
| parent | 17c3ea7ff835e73d7975d0ba29a0a162e3c8b51a (diff) | |
| download | poky-f199f5e3a6c3112e348c60695f3509c21af4e911.tar.gz | |
elfutils: Fix CVE-2025-1371
A vulnerability has been found in GNU elfutils 0.192 and classified as problematic.
This vulnerability affects the function handle_dynamic_symtab of the file readelf.c
of the component eu-read. The manipulation leads to null pointer dereference.
Attacking locally is a requirement. The exploit has been disclosed to the public and
may be used. The patch is identified as b38e562a4c907e08171c76b8b2def8464d5a104a. It
is recommended to apply a patch to fix this issue.
References:
https://nvd.nist.gov/vuln/detail/CVE-2025-1371
https://ubuntu.com/security/CVE-2025-1371
Upstream patch:
https://sourceware.org/git/?p=elfutils.git;a=commit;h=b38e562a4c907e08171c76b8b2def8464d5a104a
(From OE-Core rev: 36a322934f6f7dc8d0890c531d68c0f7de69be13)
Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/recipes-devtools')
| -rw-r--r-- | meta/recipes-devtools/elfutils/elfutils_0.192.bb | 1 | ||||
| -rw-r--r-- | meta/recipes-devtools/elfutils/files/CVE-2025-1371.patch | 41 |
2 files changed, 42 insertions, 0 deletions
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.192.bb b/meta/recipes-devtools/elfutils/elfutils_0.192.bb index ff40ba64ec..2f34bfeebb 100644 --- a/meta/recipes-devtools/elfutils/elfutils_0.192.bb +++ b/meta/recipes-devtools/elfutils/elfutils_0.192.bb | |||
| @@ -24,6 +24,7 @@ SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \ | |||
| 24 | file://0001-libelf-Add-libeu-objects-to-libelf.a-static-archive.patch \ | 24 | file://0001-libelf-Add-libeu-objects-to-libelf.a-static-archive.patch \ |
| 25 | file://CVE-2025-1352.patch \ | 25 | file://CVE-2025-1352.patch \ |
| 26 | file://CVE-2025-1365.patch \ | 26 | file://CVE-2025-1365.patch \ |
| 27 | file://CVE-2025-1371.patch \ | ||
| 27 | " | 28 | " |
| 28 | SRC_URI:append:libc-musl = " \ | 29 | SRC_URI:append:libc-musl = " \ |
| 29 | file://0003-musl-utils.patch \ | 30 | file://0003-musl-utils.patch \ |
diff --git a/meta/recipes-devtools/elfutils/files/CVE-2025-1371.patch b/meta/recipes-devtools/elfutils/files/CVE-2025-1371.patch new file mode 100644 index 0000000000..9ecb045f82 --- /dev/null +++ b/meta/recipes-devtools/elfutils/files/CVE-2025-1371.patch | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | From b38e562a4c907e08171c76b8b2def8464d5a104a Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Mark Wielaard <mark@klomp.org> | ||
| 3 | Date: Sun, 9 Feb 2025 00:07:13 +0100 | ||
| 4 | Subject: [PATCH] readelf: Handle NULL phdr in handle_dynamic_symtab | ||
| 5 | |||
| 6 | A corrupt ELF file can have broken program headers, in which case | ||
| 7 | gelf_getphdr returns NULL. This could crash handle_dynamic_symtab | ||
| 8 | while searching for the PT_DYNAMIC phdr. Fix this by checking whether | ||
| 9 | gelf_phdr returns NULL. | ||
| 10 | |||
| 11 | * src/readelf.c (handle_dynamic_symtab): Check whether | ||
| 12 | gelf_getphdr returns NULL. | ||
| 13 | |||
| 14 | https://sourceware.org/bugzilla/show_bug.cgi?id=32655 | ||
| 15 | |||
| 16 | CVE: CVE-2025-1371 | ||
| 17 | |||
| 18 | Upstream-Status: Backport [https://sourceware.org/git/?p=elfutils.git;a=commit;h=b38e562a4c907e08171c76b8b2def8464d5a104a] | ||
| 19 | |||
| 20 | Signed-off-by: Mark Wielaard <mark@klomp.org> | ||
| 21 | Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com> | ||
| 22 | --- | ||
| 23 | src/readelf.c | 2 +- | ||
| 24 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 25 | |||
| 26 | diff --git a/src/readelf.c b/src/readelf.c | ||
| 27 | index 105cddf..a526fa8 100644 | ||
| 28 | --- a/src/readelf.c | ||
| 29 | +++ b/src/readelf.c | ||
| 30 | @@ -2912,7 +2912,7 @@ handle_dynamic_symtab (Ebl *ebl) | ||
| 31 | for (size_t i = 0; i < phnum; ++i) | ||
| 32 | { | ||
| 33 | phdr = gelf_getphdr (ebl->elf, i, &phdr_mem); | ||
| 34 | - if (phdr->p_type == PT_DYNAMIC) | ||
| 35 | + if (phdr == NULL || phdr->p_type == PT_DYNAMIC) | ||
| 36 | break; | ||
| 37 | } | ||
| 38 | if (phdr == NULL) | ||
| 39 | -- | ||
| 40 | 2.43.2 | ||
| 41 | |||
