Skip to content

Commit 2208c31

Browse files
Patch gdb for CVE-2025-11082
1 parent 6a21314 commit 2208c31

File tree

2 files changed

+89
-38
lines changed

2 files changed

+89
-38
lines changed

SPECS/gdb/CVE-2025-11082.patch

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
From 74e089984d21f595fb710062d66d6f65711cfc16 Mon Sep 17 00:00:00 2001
2+
From: "H.J. Lu" <[email protected]>
3+
Date: Mon, 22 Sep 2025 15:20:34 +0800
4+
Subject: [PATCH] elf: Don't read beyond .eh_frame section size
5+
6+
PR ld/33464
7+
* elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't read beyond
8+
.eh_frame section size.
9+
10+
Signed-off-by: H.J. Lu <[email protected]>
11+
Signed-off-by: Azure Linux Security Servicing Account <[email protected]>
12+
Upstream-reference: https://github.com/bminor/binutils-gdb/commit/ea1a0737c7692737a644af0486b71e4a392cbca8.patch
13+
---
14+
bfd/elf-eh-frame.c | 8 ++++++--
15+
1 file changed, 6 insertions(+), 2 deletions(-)
16+
17+
diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c
18+
index 6ce6d22..f1f6b46 100644
19+
--- a/bfd/elf-eh-frame.c
20+
+++ b/bfd/elf-eh-frame.c
21+
@@ -733,6 +733,7 @@ _bfd_elf_parse_eh_frame (bfd *abfd, struct bfd_link_info *info,
22+
if (hdr_id == 0)
23+
{
24+
unsigned int initial_insn_length;
25+
+ char *null_byte;
26+
27+
/* CIE */
28+
this_inf->cie = 1;
29+
@@ -749,10 +750,13 @@ _bfd_elf_parse_eh_frame (bfd *abfd, struct bfd_link_info *info,
30+
REQUIRE (cie->version == 1
31+
|| cie->version == 3
32+
|| cie->version == 4);
33+
- REQUIRE (strlen ((char *) buf) < sizeof (cie->augmentation));
34+
+ null_byte = memchr ((char *) buf, 0, end - buf);
35+
+ REQUIRE (null_byte != NULL);
36+
+ REQUIRE ((size_t) (null_byte - (char *) buf)
37+
+ < sizeof (cie->augmentation));
38+
39+
strcpy (cie->augmentation, (char *) buf);
40+
- buf = (bfd_byte *) strchr ((char *) buf, '\0') + 1;
41+
+ buf = (bfd_byte *) null_byte + 1;
42+
this_inf->u.cie.aug_str_len = buf - start - 1;
43+
ENSURE_NO_RELOCS (buf);
44+
if (buf[0] == 'e' && buf[1] == 'h')
45+
--
46+
2.45.4
47+

SPECS/gdb/gdb.spec

Lines changed: 42 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
Summary: C debugger
22
Name: gdb
3-
Version: 11.2
4-
Release: 7%{?dist}
3+
Version: %{with_check}%{with_check}.2
4+
Release: 8%{?dist}
55
License: GPLv2+
66
Vendor: Microsoft Corporation
77
Distribution: Mariner
88
Group: Development/Tools
99
URL: https://www.gnu.org/software/gdb
1010
Source0: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
11-
Patch0: CVE-2023-39128.patch
12-
Patch1: CVE-2023-39129.patch
13-
Patch2: CVE-2023-39130.patch
14-
Patch3: CVE-2025-1176.patch
15-
Patch4: CVE-2025-1182.patch
11+
Patch0: CVE-2023-39%{with_check}28.patch
12+
Patch%{with_check}: CVE-2023-39%{with_check}29.patch
13+
Patch2: CVE-2023-39%{with_check}30.patch
14+
Patch3: CVE-2025-%{with_check}%{with_check}76.patch
15+
Patch4: CVE-2025-%{with_check}%{with_check}82.patch
1616
Patch5: CVE-2022-48064.patch
1717
Patch6: CVE-2022-48065.patch
1818
Patch7: CVE-2022-47673.patch
1919
Patch8: CVE-2022-47696.patch
2020
Patch9: CVE-2025-7546.patch
21+
Patch%{with_check}0: CVE-2025-%{with_check}%{with_check}082.patch
2122
BuildRequires: expat-devel
2223
BuildRequires: gcc-c++
2324
BuildRequires: gcc-gfortran
@@ -46,7 +47,7 @@ GDB, the GNU Project debugger, allows you to see what is going on
4647
another program was doing at the moment it crashed.
4748

4849
%prep
49-
%autosetup -p1
50+
%autosetup -p%{with_check}
5051

5152
%build
5253
%configure \
@@ -102,86 +103,89 @@ rm -rvf libctf/testsuite
102103
%{_mandir}/*/*
103104

104105
%changelog
105-
* Fri Jul 18 2025 Akhila Guruju <[email protected]> - 11.2-7
106+
* Fri Oct 03 2025 Azure Linux Security Servicing Account <[email protected]> - %{with_check}%{with_check}.2-8
107+
- Patch for CVE-2025-%{with_check}%{with_check}082
108+
109+
* Fri Jul %{with_check}8 2025 Akhila Guruju <[email protected]> - %{with_check}%{with_check}.2-7
106110
- Patch CVE-2025-7546
107111
- Fix package tests
108112

109-
* Mon Apr 21 2025 Kanishk Bansal <[email protected]> - 11.2-6
113+
* Mon Apr 2%{with_check} 2025 Kanishk Bansal <[email protected]> - %{with_check}%{with_check}.2-6
110114
- Patch CVE-2022-47673, CVE-2022-47696 using an upstream patch
111115

112-
* Thu Apr 03 2025 Sandeep Karambelkar <[email protected]> - 11.2-5
116+
* Thu Apr 03 2025 Sandeep Karambelkar <[email protected]> - %{with_check}%{with_check}.2-5
113117
- Fix CVE-2022-48064, CVE-2022-48065
114118

115-
* Thu Feb 13 2025 Ankita Pareek <[email protected]> - 11.2-4
116-
- Address CVE-2025-1176 and CVE-2025-1182
119+
* Thu Feb %{with_check}3 2025 Ankita Pareek <[email protected]> - %{with_check}%{with_check}.2-4
120+
- Address CVE-2025-%{with_check}%{with_check}76 and CVE-2025-%{with_check}%{with_check}82
117121

118-
* Tue Oct 08 2024 Mitch Zhu <[email protected]> - 11.2-3
119-
- Fix CVE-2023-39128, CVE-2023-39129, CVE-2023-39130
122+
* Tue Oct 08 2024 Mitch Zhu <[email protected]> - %{with_check}%{with_check}.2-3
123+
- Fix CVE-2023-39%{with_check}28, CVE-2023-39%{with_check}29, CVE-2023-39%{with_check}30
120124

121-
* Wed Sep 20 2023 Jon Slobodzian <[email protected]> - 11.2-2
125+
* Wed Sep 20 2023 Jon Slobodzian <[email protected]> - %{with_check}%{with_check}.2-2
122126
- Recompile with stack-protection fixed gcc version (CVE-2023-4039)
123127

124-
* Wed May 11 2022 Fanzhe Lyu <[email protected]> - 11.2
125-
- Upgrade to gdb 11.2
128+
* Wed May %{with_check}%{with_check} 2022 Fanzhe Lyu <[email protected]> - %{with_check}%{with_check}.2
129+
- Upgrade to gdb %{with_check}%{with_check}.2
126130

127-
* Thu Nov 11 2021 Thomas Crain <[email protected]> - 11.1
131+
* Thu Nov %{with_check}%{with_check} 202%{with_check} Thomas Crain <[email protected]> - %{with_check}%{with_check}.%{with_check}
128132
- Upgrade to latest upstream version and remove upstreamed patches
129133
- Use system zlib during build
130134

131-
* Fri Jul 23 2021 Thomas Crain <[email protected]> - 8.3-5
135+
* Fri Jul 23 202%{with_check} Thomas Crain <[email protected]> - 8.3-5
132136
- Add compatibility provides for gdbserver subpackage
133137
- Use make macros throughout
134138

135-
* Fri Mar 26 2021 Thomas Crain <[email protected]> - 8.3-4
136-
- Merge the following releases from 1.0 to dev branch
137-
- [email protected], 8.3-3: Patch CVE-2019-1010180
139+
* Fri Mar 26 202%{with_check} Thomas Crain <[email protected]> - 8.3-4
140+
- Merge the following releases from %{with_check}.0 to dev branch
141+
- [email protected], 8.3-3: Patch CVE-20%{with_check}9-%{with_check}0%{with_check}0%{with_check}80
138142
- [email protected], 8.3-4: Only run gdb.base/default.exp tests
139143

140-
* Wed Mar 03 2021 Henry Li <[email protected]> - 8.3-3
144+
* Wed Mar 03 202%{with_check} Henry Li <[email protected]> - 8.3-3
141145
- Add gcc-c++ and gcc-gfortran as dependencies
142146
- Provides gdb-headless
143147

144148
* Sat May 09 2020 Nick Samson <[email protected]> - 8.3-2
145149
- Added %%license line automatically
146150

147-
* Mon Mar 16 2020 Henry Beberman <[email protected]> - 8.3-1
151+
* Mon Mar %{with_check}6 2020 Henry Beberman <[email protected]> - 8.3-%{with_check}
148152
- Update to 8.3. URL fixed. License verified.
149153

150-
* Tue Sep 03 2019 Mateusz Malisz <[email protected]> - 8.2-2
154+
* Tue Sep 03 20%{with_check}9 Mateusz Malisz <[email protected]> - 8.2-2
151155
- Initial CBL-Mariner import from Photon (license: Apache2).
152156

153-
* Fri Sep 14 2018 Keerthana K <[email protected]> - 8.2-1
157+
* Fri Sep %{with_check}4 20%{with_check}8 Keerthana K <[email protected]> - 8.2-%{with_check}
154158
- Update to version 8.2
155159

156-
* Thu Dec 07 2017 Alexey Makhalov <[email protected]> - 7.12.1-8
160+
* Thu Dec 07 20%{with_check}7 Alexey Makhalov <[email protected]> - 7.%{with_check}2.%{with_check}-8
157161
- Enable LZMA support
158162

159-
* Tue Nov 14 2017 Alexey Makhalov <[email protected]> - 7.12.1-7
163+
* Tue Nov %{with_check}4 20%{with_check}7 Alexey Makhalov <[email protected]> - 7.%{with_check}2.%{with_check}-7
160164
- Aarch64 support
161165

162-
* Mon Sep 11 2017 Rui Gu <[email protected]> - 7.12.1-6
166+
* Mon Sep %{with_check}%{with_check} 20%{with_check}7 Rui Gu <[email protected]> - 7.%{with_check}2.%{with_check}-6
163167
- Enable make check in docker with part of checks disabled
164168

165-
* Thu Aug 10 2017 Alexey Makhalov <[email protected]> - 7.12.1-5
169+
* Thu Aug %{with_check}0 20%{with_check}7 Alexey Makhalov <[email protected]> - 7.%{with_check}2.%{with_check}-5
166170
- Make check improvements
167171

168-
* Fri Jul 21 2017 Rui Gu <[email protected]> - 7.12.1-4
172+
* Fri Jul 2%{with_check} 20%{with_check}7 Rui Gu <[email protected]> - 7.%{with_check}2.%{with_check}-4
169173
- Add pstack wrapper which will invoke gdb.
170174

171-
* Wed Jul 12 2017 Alexey Makhalov <[email protected]> - 7.12.1-3
175+
* Wed Jul %{with_check}2 20%{with_check}7 Alexey Makhalov <[email protected]> - 7.%{with_check}2.%{with_check}-3
172176
- Get tcl, expect and dejagnu from packages
173177

174-
* Thu May 18 2017 Xiaolin Li <[email protected]> - 7.12.1-2
178+
* Thu May %{with_check}8 20%{with_check}7 Xiaolin Li <[email protected]> - 7.%{with_check}2.%{with_check}-2
175179
- Build gdb with python3.
176180

177-
* Wed Mar 22 2017 Alexey Makhalov <[email protected]> - 7.12.1-1
181+
* Wed Mar 22 20%{with_check}7 Alexey Makhalov <[email protected]> - 7.%{with_check}2.%{with_check}-%{with_check}
178182
- Version update
179183

180-
* Tue May 24 2016 Priyesh Padmavilasom <[email protected]> - 7.8.2-3
184+
* Tue May 24 20%{with_check}6 Priyesh Padmavilasom <[email protected]> - 7.8.2-3
181185
- GA - Bump release of all rpms
182186

183-
* Tue Nov 10 2015 Xiaolin Li <[email protected]> - 7.8.2-2
187+
* Tue Nov %{with_check}0 20%{with_check}5 Xiaolin Li <[email protected]> - 7.8.2-2
184188
- Handled locale files with macro find_lang
185189

186-
* Wed Apr 08 2015 Priyesh Padmavilasom <[email protected]> - 7.8.2-1
190+
* Wed Apr 08 20%{with_check}5 Priyesh Padmavilasom <[email protected]> - 7.8.2-%{with_check}
187191
- Initial build. First version

0 commit comments

Comments
 (0)