mirror of
https://git.yoctoproject.org/poky
synced 2026-02-12 03:33:02 +01:00
Backport fixes for: * CVE-2025-1352 - Upstream-Status: Backport from https://sourceware.org/git/?p=elfutils.git;a=commit;h=2636426a091bd6c6f7f02e49ab20d4cdc6bfc753 * CVE-2025-1372 - Upstream-Status: Backport from https://sourceware.org/git/?p=elfutils.git;a=commit;h=73db9d2021cab9e23fd734b0a76a612d52a6f1db (From OE-Core rev: 8ea258ad9c83be5d9548a796f7dda4ac820fc435) Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
51 lines
1.8 KiB
Diff
51 lines
1.8 KiB
Diff
From 73db9d2021cab9e23fd734b0a76a612d52a6f1db Mon Sep 17 00:00:00 2001
|
|
From: Mark Wielaard <mark@klomp.org>
|
|
Date: Sun, 9 Feb 2025 00:07:39 +0100
|
|
Subject: [PATCH] readelf: Skip trying to uncompress sections without a name
|
|
|
|
When combining eu-readelf -z with -x or -p to dump the data or strings
|
|
in an (corrupted ELF) unnamed numbered section eu-readelf could crash
|
|
trying to check whether the section name starts with .zdebug. Fix this
|
|
by skipping sections without a name.
|
|
|
|
* src/readelf.c (dump_data_section): Don't try to gnu decompress a
|
|
section without a name.
|
|
(print_string_section): Likewise.
|
|
|
|
https://sourceware.org/bugzilla/show_bug.cgi?id=32656
|
|
|
|
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
|
|
Upstream-Status: Backport [https://sourceware.org/git/?p=elfutils.git;a=commit;h=73db9d2021cab9e23fd734b0a76a612d52a6f1db]
|
|
CVE: CVE-2025-1372
|
|
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
|
---
|
|
src/readelf.c | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/readelf.c b/src/readelf.c
|
|
index 256165d..48eee26 100644
|
|
--- a/src/readelf.c
|
|
+++ b/src/readelf.c
|
|
@@ -12719,7 +12719,7 @@ dump_data_section (Elf_Scn *scn, const GElf_Shdr *shdr, const char *name)
|
|
_("Couldn't uncompress section"),
|
|
elf_ndxscn (scn));
|
|
}
|
|
- else if (startswith (name, ".zdebug"))
|
|
+ else if (name && startswith (name, ".zdebug"))
|
|
{
|
|
if (elf_compress_gnu (scn, 0, 0) < 0)
|
|
printf ("WARNING: %s [%zd]\n",
|
|
@@ -12770,7 +12770,7 @@ print_string_section (Elf_Scn *scn, const GElf_Shdr *shdr, const char *name)
|
|
_("Couldn't uncompress section"),
|
|
elf_ndxscn (scn));
|
|
}
|
|
- else if (startswith (name, ".zdebug"))
|
|
+ else if (name && startswith (name, ".zdebug"))
|
|
{
|
|
if (elf_compress_gnu (scn, 0, 0) < 0)
|
|
printf ("WARNING: %s [%zd]\n",
|
|
--
|
|
2.25.1
|
|
|