Skip to content

Commit a983743

Browse files
[AUTO-CHERRYPICK] Patch openssh for CVE-2025-32728 [MEDIUM] - branch main (#13515)
Co-authored-by: Sudipta Pandit <sudpandit@microsoft.com>
1 parent f13ef2d commit a983743

2 files changed

Lines changed: 43 additions & 1 deletion

File tree

SPECS/openssh/CVE-2025-32728.patch

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
From 1526b86ec36bd7e711ef9305d9644642b4140096 Mon Sep 17 00:00:00 2001
2+
From: Sudipta Pandit <sudpandit@microsoft.com>
3+
Date: Thu, 17 Apr 2025 15:21:33 +0530
4+
Subject: [PATCH] Backport fix for CVE-2025-32728
5+
6+
Upstream ref: https://github.com/openssh/openssh-portable/commit/fc86875e6acb36401dfc1dfb6b628a9d1460f367
7+
8+
---
9+
session.c | 5 +++--
10+
1 file changed, 3 insertions(+), 2 deletions(-)
11+
12+
diff --git a/session.c b/session.c
13+
index c941511..98cd183 100644
14+
--- a/session.c
15+
+++ b/session.c
16+
@@ -2176,7 +2176,8 @@ session_auth_agent_req(struct ssh *ssh, Session *s)
17+
if ((r = sshpkt_get_end(ssh)) != 0)
18+
sshpkt_fatal(ssh, r, "%s: parse packet", __func__);
19+
if (!auth_opts->permit_agent_forwarding_flag ||
20+
- !options.allow_agent_forwarding) {
21+
+ !options.allow_agent_forwarding ||
22+
+ options.disable_forwarding) {
23+
debug_f("agent forwarding disabled");
24+
return 0;
25+
}
26+
@@ -2571,7 +2572,7 @@ session_setup_x11fwd(struct ssh *ssh, Session *s)
27+
ssh_packet_send_debug(ssh, "X11 forwarding disabled by key options.");
28+
return 0;
29+
}
30+
- if (!options.x11_forwarding) {
31+
+ if (!options.x11_forwarding || options.disable_forwarding) {
32+
debug("X11 forwarding disabled in server configuration file.");
33+
return 0;
34+
}
35+
--
36+
2.34.1
37+

SPECS/openssh/openssh.spec

Lines changed: 6 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: 7%{?dist}
6+
Release: 8%{?dist}
77
License: BSD
88
Vendor: Microsoft Corporation
99
Distribution: Mariner
@@ -49,6 +49,7 @@ Patch350: CVE-2023-28531.patch
4949
# Patch for CVE-2024-6387 can be removed if openssh is upgraded to version 9.8p1 or greater
5050
Patch351: CVE-2024-6387.patch
5151
Patch352: CVE-2025-26465.patch
52+
Patch353: CVE-2025-32728.patch
5253
BuildRequires: audit-devel
5354
BuildRequires: autoconf
5455
BuildRequires: e2fsprogs-devel
@@ -136,6 +137,7 @@ popd
136137
%patch350 -p1 -b .cve-2023-28531
137138
%patch351 -p1 -b .cve-2024-6387
138139
%patch352 -p1 -b .cve-2025-26465
140+
%patch353 -p1 -b .cve-2025-32728
139141

140142
%build
141143
export CFLAGS="$CFLAGS -fpic"
@@ -292,6 +294,9 @@ fi
292294
%{_mandir}/man8/ssh-sk-helper.8.gz
293295

294296
%changelog
297+
* Fri Apr 18 2025 Sudipta Pandit <sudpandit@microsoft.com> - 8.9p1-8
298+
- Patch CVE-2025-32728
299+
295300
* Fri Feb 14 2025 Jon Slobodzian <joslobo@microsoft.com> - 8.9p1-7
296301
- Patch for CVE-2025-26465 and CVE-2025-26466.
297302

0 commit comments

Comments
 (0)