Skip to content

Commit 86a5eca

Browse files
author
Lucas RAVAGNIER
committed
Fix: CVE-2026-35388 add missing askpass check for ssh -O proxy
A vulnerability was discovered in OpenSSH: when ControlMaster is set to ask or autoask, "ssh -O proxy ..." did not prompt for permission before proxying a new multiplexed connection through the master connection, unlike other mux operations. This allowed a proxy request to be granted without the expected user confirmation. Signed-off-by: Lucas RAVAGNIER <lucas.ravagnier@vates.tech>
1 parent 39dee55 commit 86a5eca

2 files changed

Lines changed: 51 additions & 0 deletions

File tree

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
Origin: upstream, https://github.com/openssh/openssh-portable/commit/c805b97b67c774e0bf922ffb29dfbcda9d7b5add
2+
Backport notes:
3+
- Only the "version identifier/RCS ID" in headers has been modified.
4+
5+
From c805b97b67c774e0bf922ffb29dfbcda9d7b5add Mon Sep 17 00:00:00 2001
6+
From: "djm@openbsd.org" <djm@openbsd.org>
7+
Date: Thu, 2 Apr 2026 07:39:57 +0000
8+
Subject: [PATCH] upstream: add missing askpass check when using
9+
10+
ControlMaster=ask/autoask and "ssh -O proxy ..."; reported by Michalis
11+
Vasileiadis
12+
13+
OpenBSD-Commit-ID: 8dd7b9b96534e9a8726916b96d36bed466d3836a
14+
Backported-by: Lucas Ravagnier <lucas.ravagnier@vates.tech>
15+
---
16+
mux.c | 12 +++++++++++-
17+
1 file changed, 11 insertions(+), 1 deletion(-)
18+
19+
diff --git a/mux.c b/mux.c
20+
index 5e20c7760..0cd169732 100644
21+
--- a/mux.c
22+
+++ b/mux.c
23+
@@ -1,4 +1,4 @@
24+
-/* $OpenBSD: mux.c,v 1.101 2023/11/23 03:37:05 dtucker Exp $ */
25+
+/* $OpenBSD: mux.c,v 1.113 2026/04/02 07:39:57 djm Exp $ */
26+
/*
27+
* Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org>
28+
*
29+
@@ -1172,6 +1172,16 @@ mux_master_process_proxy(struct ssh *ssh, u_int rid,
30+
31+
debug_f("channel %d: proxy request", c->self);
32+
33+
+ if (options.control_master == SSHCTL_MASTER_ASK ||
34+
+ options.control_master == SSHCTL_MASTER_AUTO_ASK) {
35+
+ if (!ask_permission("Allow multiplex proxy connection?")) {
36+
+ debug2_f("proxy refused by user");
37+
+ reply_error(reply, MUX_S_PERMISSION_DENIED, rid,
38+
+ "Permission denied");
39+
+ return 0;
40+
+ }
41+
+ }
42+
+
43+
c->mux_rcb = channel_proxy_downstream;
44+
if ((r = sshbuf_put_u32(reply, MUX_S_PROXY)) != 0 ||
45+
(r = sshbuf_put_u32(reply, rid)) != 0)
46+
--
47+
2.54.0
48+

SPECS/openssh.spec

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ Patch1007: openssh-9.8p1-CVE-2025-32728-Fix-logic-error-in-DisableForwarding-opt
132132
Patch1008: openssh-9.8p1-CVE-2025-61984-Improve-rules-for-expansion-of-username.patch
133133
Patch1009: openssh-9.8p1-CVE-2025-61985-don-t-allow-0-characters-in-url-encoded-str.patch
134134
Patch1010: openssh-9.8p1-CVE-2026-35385-when-downloading-files-as-root-in-legacy-O-.patch
135+
Patch1011: openssh-9.8p1-CVE-2026-35388-add-missing-askpass-check-when-using.patch
135136

136137
Source24: ssh_config
137138
Source25: sshd_config
@@ -529,6 +530,8 @@ cat %{_sysconfdir}/ssh/ssh_config.dup > %{_sysconfdir}/ssh/ssh_config
529530
- Fix CVE-2026-35385 (files downloaded as root with scp's legacy -O mode
530531
but without -p did not have their setuid/setgid bits cleared, allowing
531532
privilege escalation)
533+
- Fix CVE-2026-35388 (missing askpass confirmation when using
534+
ControlMaster=ask/autoask with "ssh -O proxy ...")
532535

533536
* Wed Apr 29 2026 Vincent Michel <vincent.michel@vates.tech> - 9.8p1-1.2.4
534537
- Disable the use of ssh-rsa with SHA-1 (temporarily enabled in 9.8p1-1.2.2)

0 commit comments

Comments
 (0)