Skip to content

Commit e74212b

Browse files
authored
[Medium] Patch binutils-2.37 for CVE-2025-5245 and CVE-2025-5244 (#13982)
Signed-off-by: AkarshHCL <[email protected]>
1 parent b863739 commit e74212b

File tree

7 files changed

+87
-13
lines changed

7 files changed

+87
-13
lines changed

SPECS/binutils/CVE-2025-5244.patch

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
From 29477093469001a51d96b82a032ce17183c9ea7b Mon Sep 17 00:00:00 2001
2+
From: AkarshHCL <[email protected]>
3+
Date: Mon, 9 Jun 2025 17:30:02 +0000
4+
Subject: [PATCH] Address CVE-2025-5244
5+
6+
Upstream Patch reference: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d1458933830456e54223d9fc61f0d9b3a19256f5
7+
8+
---
9+
bfd/elflink.c | 3 ++-
10+
1 file changed, 2 insertions(+), 1 deletion(-)
11+
12+
diff --git a/bfd/elflink.c b/bfd/elflink.c
13+
index d838cd9f..51790953 100644
14+
--- a/bfd/elflink.c
15+
+++ b/bfd/elflink.c
16+
@@ -13831,7 +13831,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)
26+
--
27+
2.45.2
28+

SPECS/binutils/CVE-2025-5245.patch

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
From 1d28410b1def74897f1df8d95473409aa076813e Mon Sep 17 00:00:00 2001
2+
From: AkarshHCL <[email protected]>
3+
Date: Mon, 9 Jun 2025 14:37:38 +0000
4+
Subject: [PATCH] Address CVE-2025-5245
5+
6+
Upstream Patch reference: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6c3458a8b7ee7d39f070c7b2350851cb2110c65a
7+
8+
---
9+
binutils/debug.c | 9 +++------
10+
1 file changed, 3 insertions(+), 6 deletions(-)
11+
12+
diff --git a/binutils/debug.c b/binutils/debug.c
13+
index 93887374..404813fa 100644
14+
--- a/binutils/debug.c
15+
+++ b/binutils/debug.c
16+
@@ -2545,9 +2545,6 @@ debug_write_type (struct debug_handle *info,
17+
case DEBUG_KIND_UNION_CLASS:
18+
return debug_write_class_type (info, fns, fhandle, type, tag);
19+
case DEBUG_KIND_ENUM:
20+
- if (type->u.kenum == NULL)
21+
- return (*fns->enum_type) (fhandle, tag, (const char **) NULL,
22+
- (bfd_signed_vma *) NULL);
23+
return (*fns->enum_type) (fhandle, tag, type->u.kenum->names,
24+
type->u.kenum->values);
25+
case DEBUG_KIND_POINTER:
26+
@@ -3089,9 +3086,9 @@ debug_type_samep (struct debug_handle *info, struct debug_type_s *t1,
27+
break;
28+
29+
case DEBUG_KIND_ENUM:
30+
- if (t1->u.kenum == NULL)
31+
- ret = t2->u.kenum == NULL;
32+
- else if (t2->u.kenum == NULL)
33+
+ if (t1->u.kenum->names == NULL)
34+
+ ret = t2->u.kenum->names == NULL;
35+
+ else if (t2->u.kenum->names == NULL)
36+
ret = false;
37+
else
38+
{
39+
--
40+
2.45.2
41+

SPECS/binutils/binutils.spec

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
Summary: Contains a linker, an assembler, and other tools
2222
Name: binutils
2323
Version: 2.37
24-
Release: 14%{?dist}
24+
Release: 15%{?dist}
2525
License: GPLv2+
2626
Vendor: Microsoft Corporation
2727
Distribution: Mariner
@@ -51,6 +51,8 @@ Patch16: CVE-2025-1181.patch
5151
Patch17: CVE-2025-1182.patch
5252
Patch18: CVE-2025-1178.patch
5353
Patch19: CVE-2025-1744.patch
54+
Patch20: CVE-2025-5245.patch
55+
Patch21: CVE-2025-5244.patch
5456
Provides: bundled(libiberty)
5557

5658
# Moving macro before the "SourceX" tags breaks PR checks parsing the specs.
@@ -307,6 +309,9 @@ find %{buildroot} -type f -name "*.la" -delete -print
307309
%do_files aarch64-linux-gnu %{build_aarch64}
308310

309311
%changelog
312+
* Mon Jun 9 2025 Akarsh Chaudhary <[email protected]>- 2.37-15
313+
- Patch CVE-2025-5245 ,CVE-2025-5244
314+
310315
* Tue Mar 11 2025 Kavya Sree Kaitepalli <[email protected]> - 2.37-14
311316
- Fix CVE-2025-1744
312317

toolkit/resources/manifests/package/pkggen_core_aarch64.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ zlib-devel-1.2.13-2.cm2.aarch64.rpm
1212
file-5.40-3.cm2.aarch64.rpm
1313
file-devel-5.40-3.cm2.aarch64.rpm
1414
file-libs-5.40-3.cm2.aarch64.rpm
15-
binutils-2.37-14.cm2.aarch64.rpm
16-
binutils-devel-2.37-14.cm2.aarch64.rpm
15+
binutils-2.37-15.cm2.aarch64.rpm
16+
binutils-devel-2.37-15.cm2.aarch64.rpm
1717
gmp-6.2.1-4.cm2.aarch64.rpm
1818
gmp-devel-6.2.1-4.cm2.aarch64.rpm
1919
mpfr-4.1.0-2.cm2.aarch64.rpm

toolkit/resources/manifests/package/pkggen_core_x86_64.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ zlib-devel-1.2.13-2.cm2.x86_64.rpm
1212
file-5.40-3.cm2.x86_64.rpm
1313
file-devel-5.40-3.cm2.x86_64.rpm
1414
file-libs-5.40-3.cm2.x86_64.rpm
15-
binutils-2.37-14.cm2.x86_64.rpm
16-
binutils-devel-2.37-14.cm2.x86_64.rpm
15+
binutils-2.37-15.cm2.x86_64.rpm
16+
binutils-devel-2.37-15.cm2.x86_64.rpm
1717
gmp-6.2.1-4.cm2.x86_64.rpm
1818
gmp-devel-6.2.1-4.cm2.x86_64.rpm
1919
mpfr-4.1.0-2.cm2.x86_64.rpm

toolkit/resources/manifests/package/toolchain_aarch64.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ bash-5.1.8-4.cm2.aarch64.rpm
99
bash-debuginfo-5.1.8-4.cm2.aarch64.rpm
1010
bash-devel-5.1.8-4.cm2.aarch64.rpm
1111
bash-lang-5.1.8-4.cm2.aarch64.rpm
12-
binutils-2.37-14.cm2.aarch64.rpm
13-
binutils-debuginfo-2.37-14.cm2.aarch64.rpm
14-
binutils-devel-2.37-14.cm2.aarch64.rpm
12+
binutils-2.37-15.cm2.aarch64.rpm
13+
binutils-debuginfo-2.37-15.cm2.aarch64.rpm
14+
binutils-devel-2.37-15.cm2.aarch64.rpm
1515
bison-3.7.6-2.cm2.aarch64.rpm
1616
bison-debuginfo-3.7.6-2.cm2.aarch64.rpm
1717
bzip2-1.0.8-1.cm2.aarch64.rpm

toolkit/resources/manifests/package/toolchain_x86_64.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ bash-5.1.8-4.cm2.x86_64.rpm
99
bash-debuginfo-5.1.8-4.cm2.x86_64.rpm
1010
bash-devel-5.1.8-4.cm2.x86_64.rpm
1111
bash-lang-5.1.8-4.cm2.x86_64.rpm
12-
binutils-2.37-14.cm2.x86_64.rpm
13-
binutils-aarch64-linux-gnu-2.37-14.cm2.x86_64.rpm
14-
binutils-debuginfo-2.37-14.cm2.x86_64.rpm
15-
binutils-devel-2.37-14.cm2.x86_64.rpm
12+
binutils-2.37-15.cm2.x86_64.rpm
13+
binutils-aarch64-linux-gnu-2.37-15.cm2.x86_64.rpm
14+
binutils-debuginfo-2.37-15.cm2.x86_64.rpm
15+
binutils-devel-2.37-15.cm2.x86_64.rpm
1616
bison-3.7.6-2.cm2.x86_64.rpm
1717
bison-debuginfo-3.7.6-2.cm2.x86_64.rpm
1818
bzip2-1.0.8-1.cm2.x86_64.rpm
@@ -47,7 +47,7 @@ cracklib-lang-2.9.7-5.cm2.x86_64.rpm
4747
createrepo_c-0.17.5-1.cm2.x86_64.rpm
4848
createrepo_c-debuginfo-0.17.5-1.cm2.x86_64.rpm
4949
createrepo_c-devel-0.17.5-1.cm2.x86_64.rpm
50-
cross-binutils-common-2.37-14.cm2.noarch.rpm
50+
cross-binutils-common-2.37-15.cm2.noarch.rpm
5151
cross-gcc-common-11.2.0-8.cm2.noarch.rpm
5252
curl-8.8.0-6.cm2.x86_64.rpm
5353
curl-debuginfo-8.8.0-6.cm2.x86_64.rpm

0 commit comments

Comments
 (0)