Skip to content

Commit fd9ff7f

Browse files
[AUTO-CHERRYPICK] Patch openssh to fix CVE-2023-28531 - branch main (#9519)
Co-authored-by: Sam Meluch <[email protected]>
1 parent 623d203 commit fd9ff7f

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

SPECS/openssh/CVE-2023-28531.patch

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From 54ac4ab2b53ce9fcb66b8250dee91c070e4167ed Mon Sep 17 00:00:00 2001
2+
3+
Date: Thu, 9 Mar 2023 06:58:26 +0000
4+
Subject: [PATCH] upstream: include destination constraints for smartcard keys
5+
too.
6+
7+
Spotted by Luci Stanescu; ok deraadt@ markus@
8+
9+
OpenBSD-Commit-ID: add879fac6903a1cb1d1e42c4309e5359c3d870f
10+
---
11+
authfd.c | 2 +-
12+
1 file changed, 1 insertions(+), 1 deletions(-)
13+
14+
diff --git a/authfd.c b/authfd.c
15+
index 13f9432efb3..77dc3cce597 100644
16+
--- a/authfd.c
17+
@@ -665,7 +665,7 @@ ssh_update_card(int sock, int add, const char *reader_id, const char *pin,
18+
struct dest_constraint **dest_constraints, size_t ndest_constraints)
19+
{
20+
struct sshbuf *msg;
21+
- int r, constrained = (life || confirm);
22+
+ int r, constrained = (life || confirm || dest_constraints);
23+
u_char type;
24+
25+
if (add) {

SPECS/openssh/openssh.spec

+7-1
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: 4%{?dist}
6+
Release: 5%{?dist}
77
License: BSD
88
Vendor: Microsoft Corporation
99
Distribution: Mariner
@@ -44,6 +44,8 @@ Patch316: CVE-2023-48795-0006-upstream-Remove-leftover-line.patch
4444
Patch317: CVE-2023-48795-0007-upstream-Refactor-creation-of-KEX-proposal.patch
4545
Patch318: CVE-2023-48795-0008-upstream-Limit-number-of-entries-in-SSH2_MSG_EXT_INF.patch
4646
Patch319: CVE-2023-48795-0009-upstream-implement-strict-key-exchange-in-ssh-and-ss.patch
47+
# Patch for CVE-2023-28531 can be removed if openssh is upgraded to version 9.3p1 or greater
48+
Patch350: CVE-2023-28531.patch
4749
BuildRequires: audit-devel
4850
BuildRequires: autoconf
4951
BuildRequires: e2fsprogs-devel
@@ -128,6 +130,7 @@ popd
128130
%patch317 -p1 -b .cve-2023-48795-0007
129131
%patch318 -p1 -b .cve-2023-48795-0008
130132
%patch319 -p1 -b .cve-2023-48795-0009
133+
%patch350 -p1 -b .cve-2023-28531
131134

132135
%build
133136
export CFLAGS="$CFLAGS -fpic"
@@ -284,6 +287,9 @@ fi
284287
%{_mandir}/man8/ssh-sk-helper.8.gz
285288

286289
%changelog
290+
* Tue Jun 25 2024 Sam Meluch <[email protected]> - 8.9p1-5
291+
- Add patch for CVE-2023-28531
292+
287293
* Mon Jan 8 15:23:58 EST 2024 Dan Streetman <[email protected]> - 8.9p1-4
288294
- Add patches for CVE-2023-48795
289295

0 commit comments

Comments
 (0)