Skip to content

Commit 4249a35

Browse files
[AUTO-CHERRYPICK] Fix crash for CVE-2021-20197, CVE-2022-47673, CVE-2022-47696, CVE-2022-37434 [High] - branch main (#13536)
Co-authored-by: Kanishk Bansal <103916909+Kanishk-Bansal@users.noreply.github.com>
1 parent 3f88cc7 commit 4249a35

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

SPECS/crash/crash.signatures.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"Signatures": {
33
"crash-8.0.1.tar.gz": "233208b1433a49e1d5a063fa88e6fc9772b99fbb7b30ae79a2115d1b8f0dfc52",
4-
"gdb-10.2.tar.gz": "b33ad58d687487a821ec8d878daab0f716be60d0936f2e3ac5cf08419ce70350"
4+
"gdb-10.2-3.tar.gz": "0d322f3c3ee75b364eb4f90b394c9ecc17800d2a94d2913a5ea845acead26bd2"
55
}
66
}

SPECS/crash/crash.spec

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1+
%global gdb_version 10.2
12
Name: crash
23
Version: 8.0.1
3-
Release: 3%{?dist}
4+
Release: 4%{?dist}
45
Summary: kernel crash analysis utility for live systems, netdump, diskdump, kdump, LKCD or mcore dumpfiles
56
Group: Development/Tools
67
Vendor: Microsoft Corporation
78
Distribution: Mariner
89
URL: https://github.com/crash-utility/crash
910
Source0: https://github.com/crash-utility/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
1011
# crash requires gdb tarball for the build. There is no option to use the host gdb. For crash 8.0.1 the newest supported gdb version is 10.2.
11-
Source1: https://ftp.gnu.org/gnu/gdb/gdb-10.2.tar.gz
12+
# '-3' version of the tarball contains fix for CVE-2021-20197, CVE-2022-47673, CVE-2022-47696, CVE-2022-37434 which cannot be applied as a .patch because source1 is only untar'ed during crash make
13+
Source1: gdb-%{gdb_version}-3.tar.gz
1214
# lzo patch sourced from https://src.fedoraproject.org/rpms/crash/blob/rawhide/f/lzo_snappy_zstd.patch
1315
Patch0: lzo_snappy_zstd.patch
1416
License: GPLv3+
@@ -36,7 +38,8 @@ This package contains libraries and header files need for development.
3638

3739
%prep
3840
%autosetup -n %{name}-%{version}
39-
cp %{SOURCE1} .
41+
# make expect the gdb tarball to be named with its version only, gdb-[version].tar.gz, e.g.: gdb-10.2.tar.gz
42+
cp %{SOURCE1} ./gdb-%{gdb_version}.tar.gz
4043

4144
%build
4245
make RPMPKG=%{version}-%{release}
@@ -55,14 +58,17 @@ cp -p defs.h %{buildroot}%{_includedir}/crash
5558
%license COPYING3
5659
%{_bindir}/crash
5760
%{_mandir}/man8/crash.8.gz
58-
%doc COPYING3 README
61+
%doc README
5962

6063
%files devel
6164
%defattr(-,root,root)
6265
%dir %{_includedir}/crash
6366
%{_includedir}/crash/*.h
6467

6568
%changelog
69+
* Mon Apr 21 2025 Kanishk Bansal <kanbansal@microsoft.com> - 8.0.1-4
70+
- Update gdb-10.2-3.tar.gz to address CVE-2021-20197, CVE-2022-47673, CVE-2022-47696, CVE-2022-37434
71+
6672
* Mon Oct 09 2023 Chris Co <chrco@microsoft.com> - 8.0.1-3
6773
- Add patch from Fedora to enable lzo, snappy, zstd compression support
6874
- Remove unused crash printk fix patch

0 commit comments

Comments
 (0)