Files
poky/meta/recipes-devtools/binutils/binutils/0041-CVE-2025-5244.patch
Deepesh Varatharajan c6848d874c binutils: Fix CVE-2025-5244 & CVE-2025-5245
PR32858 ld segfault on fuzzed object
We missed one place where it is necessary to check for empty groups.

PR32829, SEGV on objdump function debug_type_samep
u.kenum is always non-NULL, see debug_make_enum_type.

Upstream-Status: Backport
[https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=d1458933830456e54223d9fc61f0d9b3a19256f5]
&& [https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=6c3458a8b7ee7d39f070c7b2350851cb2110c65a]

(From OE-Core rev: 7eb29f802b272dec19c5bfdce93155d99bac918d)

Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-06-13 08:42:35 -07:00

26 lines
813 B
Diff

From: Alan Modra <amodra@gmail.com>
Date: Thu, 10 Apr 2025 19:41:49 +0930
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=d1458933830456e54223d9fc61f0d9b3a19256f5]
CVE: CVE-2025-5244
PR32858 ld segfault on fuzzed object
We missed one place where it is necessary to check for empty groups.
Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
diff --git a/bfd/elflink.c b/bfd/elflink.c
index a76e8e38da7..549b7b7dd92 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -14408,7 +14408,8 @@ elf_gc_sweep (bfd *abfd, struct bfd_link_info *info)
if (o->flags & SEC_GROUP)
{
asection *first = elf_next_in_group (o);
- o->gc_mark = first->gc_mark;
+ if (first != NULL)
+ o->gc_mark = first->gc_mark;
}
if (o->gc_mark)