summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeepesh Varatharajan <Deepesh.Varatharajan@windriver.com>2025-06-09 21:36:54 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-06-12 11:03:43 +0100
commit3946dc51acc07935cf219cdc5cce31bd664cf291 (patch)
tree57b1a79710c9be9b380c08859240624ed5e10567
parent70800c9296f250c5b2b054d80b9e23551e885001 (diff)
downloadpoky-3946dc51acc07935cf219cdc5cce31bd664cf291.tar.gz
binutils: Fix CVE-2025-5244
PR32858 ld segfault on fuzzed object We missed one place where it is necessary to check for empty groups. Backport a patch from upstream to fix CVE-2025-5244 Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=d1458933830456e54223d9fc61f0d9b3a19256f5] (From OE-Core rev: 082c56061e910176dd464702a19858dc0d57431a) Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.44.inc1
-rw-r--r--meta/recipes-devtools/binutils/binutils/0019-CVE-2025-5244.patch25
2 files changed, 26 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils-2.44.inc b/meta/recipes-devtools/binutils/binutils-2.44.inc
index c3a597cd7b..5f4da14f6a 100644
--- a/meta/recipes-devtools/binutils/binutils-2.44.inc
+++ b/meta/recipes-devtools/binutils/binutils-2.44.inc
@@ -41,5 +41,6 @@ SRC_URI = "\
41 file://0016-CVE-2025-1181-1.patch \ 41 file://0016-CVE-2025-1181-1.patch \
42 file://0017-CVE-2025-1181-2.patch \ 42 file://0017-CVE-2025-1181-2.patch \
43 file://0018-CVE-2025-5245.patch \ 43 file://0018-CVE-2025-5245.patch \
44 file://0019-CVE-2025-5244.patch \
44" 45"
45S = "${WORKDIR}/git" 46S = "${WORKDIR}/git"
diff --git a/meta/recipes-devtools/binutils/binutils/0019-CVE-2025-5244.patch b/meta/recipes-devtools/binutils/binutils/0019-CVE-2025-5244.patch
new file mode 100644
index 0000000000..e8855a4b4b
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/0019-CVE-2025-5244.patch
@@ -0,0 +1,25 @@
1From: Alan Modra <amodra@gmail.com>
2Date: Thu, 10 Apr 2025 19:41:49 +0930
3
4Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=d1458933830456e54223d9fc61f0d9b3a19256f5]
5CVE: CVE-2025-5244
6
7PR32858 ld segfault on fuzzed object
8We missed one place where it is necessary to check for empty groups.
9
10Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
11
12diff --git a/bfd/elflink.c b/bfd/elflink.c
13index a76e8e38da7..549b7b7dd92 100644
14--- a/bfd/elflink.c
15+++ b/bfd/elflink.c
16@@ -14408,7 +14408,8 @@ elf_gc_sweep (bfd *abfd, struct bfd_link_info *info)
17 if (o->flags & SEC_GROUP)
18 {
19 asection *first = elf_next_in_group (o);
20- o->gc_mark = first->gc_mark;
21+ if (first != NULL)
22+ o->gc_mark = first->gc_mark;
23 }
24
25 if (o->gc_mark)