Skip to content

Commit 450c3cc

Browse files
CBL-Mariner-BotSeanDougherty
authored andcommitted
[AUTO-CHERRYPICK] openssh: fix "regresshion" CVE, CVE-2024-6387, with patch from debian. - branch main (#9565)
Co-authored-by: SeanDougherty <sdougherty@microsoft.com>
1 parent 8728caa commit 450c3cc

2 files changed

Lines changed: 39 additions & 1 deletion

File tree

SPECS/openssh/CVE-2024-6387.patch

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
From 46bbf63bfa678cfb48ba8f2c0012101db5b3c691 Mon Sep 17 00:00:00 2001
2+
From: Sean Dougherty <sdougherty@microsoft.com>
3+
Date: Tue, 2 Jul 2024 18:20:49 +0000
4+
Subject: [PATCH] Description: fix signal handler race condition for
5+
Regresshion CVE. https://nvd.nist.gov/vuln/detail/CVE-2024-6387
6+
7+
---
8+
log.c | 3 ++-
9+
1 file changed, 2 insertions(+), 1 deletion(-)
10+
11+
diff --git a/log.c b/log.c
12+
index 99bf046..2d231ca 100644
13+
--- a/log.c
14+
+++ b/log.c
15+
@@ -451,12 +451,13 @@ void
16+
sshsigdie(const char *file, const char *func, int line, int showfunc,
17+
LogLevel level, const char *suffix, const char *fmt, ...)
18+
{
19+
+#if 0
20+
va_list args;
21+
-
22+
va_start(args, fmt);
23+
sshlogv(file, func, line, showfunc, SYSLOG_LEVEL_FATAL,
24+
suffix, fmt, args);
25+
va_end(args);
26+
+#endif
27+
_exit(1);
28+
}
29+
30+
--
31+
2.39.4
32+

SPECS/openssh/openssh.spec

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Summary: Free version of the SSH connectivity tools
44
Name: openssh
55
Version: %{openssh_ver}
6-
Release: 5%{?dist}
6+
Release: 6%{?dist}
77
License: BSD
88
Vendor: Microsoft Corporation
99
Distribution: Mariner
@@ -46,6 +46,8 @@ Patch318: CVE-2023-48795-0008-upstream-Limit-number-of-entries-in-SSH2_MSG
4646
Patch319: CVE-2023-48795-0009-upstream-implement-strict-key-exchange-in-ssh-and-ss.patch
4747
# Patch for CVE-2023-28531 can be removed if openssh is upgraded to version 9.3p1 or greater
4848
Patch350: CVE-2023-28531.patch
49+
# Patch for CVE-2024-6387 can be removed if openssh is upgraded to version 9.8p1 or greater
50+
Patch351: CVE-2024-6387.patch
4951
BuildRequires: audit-devel
5052
BuildRequires: autoconf
5153
BuildRequires: e2fsprogs-devel
@@ -131,6 +133,7 @@ popd
131133
%patch318 -p1 -b .cve-2023-48795-0008
132134
%patch319 -p1 -b .cve-2023-48795-0009
133135
%patch350 -p1 -b .cve-2023-28531
136+
%patch351 -p1 -b .cve-2024-6387
134137

135138
%build
136139
export CFLAGS="$CFLAGS -fpic"
@@ -287,6 +290,9 @@ fi
287290
%{_mandir}/man8/ssh-sk-helper.8.gz
288291

289292
%changelog
293+
* Tue Jul 2 2024 Sean Dougherty <sdougherty@microsoft.com> - 8.9p1-6
294+
- Add patch for CVE-2024-6387 (a.k.a. "regresshion") using Debian's source as guidance.
295+
290296
* Tue Jun 25 2024 Sam Meluch <sammeluch@microsoft.com> - 8.9p1-5
291297
- Add patch for CVE-2023-28531
292298

0 commit comments

Comments
 (0)