summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorSoumya Sambu <soumya.sambu@windriver.com>2025-08-13 17:41:00 +0530
committerSteve Sakoman <steve@sakoman.com>2025-08-26 06:33:14 -0700
commitf9e6c1011ae64054abfe4a58a1729419b43edf45 (patch)
tree3b9b628e6ec1da553140fb9b075793e6debd31eb /meta
parentf199f5e3a6c3112e348c60695f3509c21af4e911 (diff)
downloadpoky-f9e6c1011ae64054abfe4a58a1729419b43edf45.tar.gz
elfutils: Fix CVE-2025-1372
A vulnerability was found in GNU elfutils 0.192. It has been declared as critical. Affected by this vulnerability is the function dump_data_section/print_string_section of the file readelf.c of the component eu-readelf. The manipulation of the argument z/x leads to buffer overflow. An attack has to be approached locally. The exploit has been disclosed to the public and may be used. The identifier of the patch is 73db9d2021cab9e23fd734b0a76a612d52a6f1db. It is recommended to apply a patch to fix this issue. References: https://nvd.nist.gov/vuln/detail/CVE-2025-1372 https://ubuntu.com/security/CVE-2025-1372 Upstream patch: https://sourceware.org/git/?p=elfutils.git;a=commit;h=73db9d2021cab9e23fd734b0a76a612d52a6f1db (From OE-Core rev: 76c57e74071f8f2f312d5c62e1f7a1ac74db54be) Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/elfutils/elfutils_0.192.bb1
-rw-r--r--meta/recipes-devtools/elfutils/files/CVE-2025-1372.patch51
2 files changed, 52 insertions, 0 deletions
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.192.bb b/meta/recipes-devtools/elfutils/elfutils_0.192.bb
index 2f34bfeebb..4dcc774bb9 100644
--- a/meta/recipes-devtools/elfutils/elfutils_0.192.bb
+++ b/meta/recipes-devtools/elfutils/elfutils_0.192.bb
@@ -25,6 +25,7 @@ SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \
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 file://CVE-2025-1371.patch \
28 file://CVE-2025-1372.patch \
28 " 29 "
29SRC_URI:append:libc-musl = " \ 30SRC_URI:append:libc-musl = " \
30 file://0003-musl-utils.patch \ 31 file://0003-musl-utils.patch \
diff --git a/meta/recipes-devtools/elfutils/files/CVE-2025-1372.patch b/meta/recipes-devtools/elfutils/files/CVE-2025-1372.patch
new file mode 100644
index 0000000000..c202d8359c
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/CVE-2025-1372.patch
@@ -0,0 +1,51 @@
1From 73db9d2021cab9e23fd734b0a76a612d52a6f1db Mon Sep 17 00:00:00 2001
2From: Mark Wielaard <mark@klomp.org>
3Date: Sun, 9 Feb 2025 00:07:39 +0100
4Subject: [PATCH] readelf: Skip trying to uncompress sections without a name
5
6When combining eu-readelf -z with -x or -p to dump the data or strings
7in an (corrupted ELF) unnamed numbered section eu-readelf could crash
8trying to check whether the section name starts with .zdebug. Fix this
9by skipping sections without a name.
10
11 * src/readelf.c (dump_data_section): Don't try to gnu decompress a
12 section without a name.
13 (print_string_section): Likewise.
14
15https://sourceware.org/bugzilla/show_bug.cgi?id=32656
16
17CVE: CVE-2025-1372
18
19Upstream-Status: Backport [https://sourceware.org/git/?p=elfutils.git;a=commit;h=73db9d2021cab9e23fd734b0a76a612d52a6f1db]
20
21Signed-off-by: Mark Wielaard <mark@klomp.org>
22Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com>
23---
24 src/readelf.c | 4 ++--
25 1 file changed, 2 insertions(+), 2 deletions(-)
26
27diff --git a/src/readelf.c b/src/readelf.c
28index a526fa8..89ee80a 100644
29--- a/src/readelf.c
30+++ b/src/readelf.c
31@@ -13321,7 +13321,7 @@ dump_data_section (Elf_Scn *scn, const GElf_Shdr *shdr, const char *name)
32 _("Couldn't uncompress section"),
33 elf_ndxscn (scn));
34 }
35- else if (startswith (name, ".zdebug"))
36+ else if (name && startswith (name, ".zdebug"))
37 {
38 if (elf_compress_gnu (scn, 0, 0) < 0)
39 printf ("WARNING: %s [%zd]\n",
40@@ -13372,7 +13372,7 @@ print_string_section (Elf_Scn *scn, const GElf_Shdr *shdr, const char *name)
41 _("Couldn't uncompress section"),
42 elf_ndxscn (scn));
43 }
44- else if (startswith (name, ".zdebug"))
45+ else if (name && startswith (name, ".zdebug"))
46 {
47 if (elf_compress_gnu (scn, 0, 0) < 0)
48 printf ("WARNING: %s [%zd]\n",
49--
502.43.2
51