openssh: fix CVE-2026-73283
PATCH 1/3 openssh: fix CVE-2026-73283
From: Hetvi Thakar <[email protected]>
This patch applies the upstream fix that makes the authorized_keys restrict keyword apply to tunnel forwarding. The upstream fix commit is referenced in [1], and the public CVE advisory is referenced in [2].
[1] https://github.com/openssh/openssh-portable/commit/d322f2ccf7da095ce94d1d99cb563246f61487b
[2] https://www.cve.org/CVERecord?id=CVE-2026-73283
--- .../openssh/openssh/CVE-2026-73283.patch | 42 +++++++++++++++++++ .../openssh/openssh_10.3p1.bb | 1 + 2 files changed, 43 insertions(+) create mode 100644 meta/recipes-connectivity/openssh/openssh/CVE-2026-73283.patch
meta/recipes-connectivity/openssh/openssh/CVE-2026-73283.patch new file +42 -0
@@ -0,0 +1,42 @@ +From d322f2ccf7da095ce94d1d99cb563246f61487b Mon Sep 17 00:00:00 2001 +From: "[email protected]" <[email protected]> +Date: Tue, 14 Jul 2026 01:05:05 +0000 +Subject: [PATCH] upstream: make authorized_keys "restrict" keyword apply + correctly + +to tunnel forwarding (which is administratively disabled by default). + +Reported by Erichen, Institute of Computing Technology, +Chinese Academy of Sciences + +OpenBSD-Commit-ID: 5b3cc987a64749c94b20e12755db32a83f8f01e6 + +CVE: CVE-2026-73283 +Upstream-Status: Backport [https://github.com/openssh/openssh-portable/commit/d322f2ccf7da095ce94d1d99cb563246f61487b] + +Backport Changes: +- Omitted the upstream OpenBSD revision-only hunk and retained the Wrynose + OpenSSH 10.3p1 revision. + +(cherry picked from commit d322f2ccf7da095ce94d1d99cb563246f61487b) +Signed-off-by: Hetvi Thakar <[email protected]> +--- + serverloop.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/serverloop.c b/serverloop.c +index 8e63480ec..9d8a3429 100644 +--- a/serverloop.c ++++ b/serverloop.c +@@ -523,7 +523,8 @@ server_request_tun(struct ssh *ssh) + ssh_packet_send_debug(ssh, "Unsupported tunnel device mode."); + return NULL; + } +- if ((options.permit_tun & mode) == 0 || options.disable_forwarding) { ++ if ((options.permit_tun & mode) == 0 || options.disable_forwarding || ++ auth_opts->restricted) { + ssh_packet_send_debug(ssh, "Server has rejected tunnel device " + "forwarding"); + return NULL; +-- +2.43.0
meta/recipes-connectivity/openssh/openssh_10.3p1.bb +1 -0
@@ -31,6 +31,7 @@ SRC_URI = "https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.ta file://CVE-2026-60001.patch \ file://CVE-2026-60002.patch \ file://CVE-2026-60000.patch \ + file://CVE-2026-73283.patch \ " SRC_URI[sha256sum] = "56682a36bb92dcf4b4f016fd8ec8e74059b79a8de25c15d670d731e7d18e45f4"
Signature · 1 line
2.35.6
PATCH 2/3 openssh: fix CVE-2026-73282
From: Hetvi Thakar <[email protected]>
This patch applies the upstream fix that tracks pending remote-forward requests by index instead of retaining a pointer that realloc may invalidate. The upstream fix commit is referenced in [1], and the public CVE advisory is referenced in [2].
[1] https://github.com/openssh/openssh-portable/commit/9910d5ef53124ce1157d57bc11e222658aa41299
[2] https://www.cve.org/CVERecord?id=CVE-2026-73282
--- .../openssh/openssh/CVE-2026-73282.patch | 80 +++++++++++++++++++ .../openssh/openssh_10.3p1.bb | 1 + 2 files changed, 81 insertions(+) create mode 100644 meta/recipes-connectivity/openssh/openssh/CVE-2026-73282.patch
meta/recipes-connectivity/openssh/openssh/CVE-2026-73282.patch new file +80 -0
@@ -0,0 +1,80 @@ +From 9910d5ef53124ce1157d57bc11e222658aa41299 Mon Sep 17 00:00:00 2001 +From: "[email protected]" <[email protected]> +Date: Fri, 7 Aug 2026 05:03:56 +0000 +Subject: [PATCH] upstream: avoid potential realloc use-after-free in the + client if a + +remote forwarding is added via the local session multiplexing socket while a +remote forwarding open request is pending with the server. + +Report and fix from Brian Mingus of Cognatory + +OpenBSD-Commit-ID: c7888d566576386d0e96859f9ec7310a1e2d3609 + +CVE: CVE-2026-73282 +Upstream-Status: Backport [https://github.com/openssh/openssh-portable/commit/9910d5ef53124ce1157d57bc11e222658aa41299] + +Backport Changes: +- Omitted the upstream OpenBSD revision-only hunk and retained the Wrynose + OpenSSH 10.3p1 revision. + +(cherry picked from commit 9910d5ef53124ce1157d57bc11e222658aa41299) +Signed-off-by: Hetvi Thakar <[email protected]> +--- + ssh.c | 19 +++++++++++++++++-- + 1 file changed, 16 insertions(+), 3 deletions(-) + +diff --git a/ssh.c b/ssh.c +index d030b548..e9f99c43 100644 +--- a/ssh.c ++++ b/ssh.c +@@ -1899,14 +1899,24 @@ + } + } + ++struct rfwd_confirm_ctx { ++ int fid; ++}; ++ + /* Callback for remote forward global requests */ + static void + ssh_confirm_remote_forward(struct ssh *ssh, int type, uint32_t seq, void *ctxt) + { +- struct Forward *rfwd = (struct Forward *)ctxt; ++ struct rfwd_confirm_ctx *rctx = (struct rfwd_confirm_ctx *)ctxt; ++ struct Forward *rfwd; + u_int port; + int r; + ++ if (rctx->fid < 0 || rctx->fid >= options.num_remote_forwards) ++ fatal_f("invalid forwarding ID %d", rctx->fid); ++ rfwd = &options.remote_forwards[rctx->fid]; ++ freezero(rctx, sizeof(*rctx)); ++ + /* XXX verbose() on failure? */ + debug("remote forward %s for: listen %s%s%d, connect %s:%d", + type == SSH2_MSG_REQUEST_SUCCESS ? "success" : "failure", +@@ -2084,6 +2094,8 @@ + + /* Initiate remote TCP/IP port forwardings. */ + for (i = 0; i < options.num_remote_forwards; i++) { ++ struct rfwd_confirm_ctx *rctx; ++ + debug("Remote connections from %.200s:%d forwarded to " + "local address %.200s:%d", + (options.remote_forwards[i].listen_path != NULL) ? +@@ -2098,9 +2110,10 @@ + if ((options.remote_forwards[i].handle = + channel_request_remote_forwarding(ssh, + &options.remote_forwards[i])) >= 0) { ++ rctx = xcalloc(1, sizeof(*rctx)); ++ rctx->fid = i; + client_register_global_confirm( +- ssh_confirm_remote_forward, +- &options.remote_forwards[i]); ++ ssh_confirm_remote_forward, rctx); + forward_confirms_pending++; + } else if (options.exit_on_forward_failure) + fatal("Could not request remote forwarding."); +-- +2.43.0
meta/recipes-connectivity/openssh/openssh_10.3p1.bb +1 -0
@@ -32,6 +32,7 @@ SRC_URI = "https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.ta file://CVE-2026-60002.patch \ file://CVE-2026-60000.patch \ file://CVE-2026-73283.patch \ + file://CVE-2026-73282.patch \ " SRC_URI[sha256sum] = "56682a36bb92dcf4b4f016fd8ec8e74059b79a8de25c15d670d731e7d18e45f4"
Signature · 1 line
2.35.6
PATCH 3/3 openssh: fix CVE-2026-73281
In reply to Hetvi Thakar -X (hthakar - E INFOCHIPS PRIVATE LIMITED at Cisco)From: Hetvi Thakar <[email protected]>
This patch applies the upstream fix that permits session-bind requests while the agent is locked so forwarded sessions remain classified as remote. The upstream fix commit is referenced in [1], and the public CVE advisory is referenced in [2].
[1] https://github.com/openssh/openssh-portable/commit/6a57081dc35acf3ee298108d4bc3580489608d5
[2] https://www.cve.org/CVERecord?id=CVE-2026-73281
--- .../openssh/openssh/CVE-2026-73281.patch | 80 +++++++++++++++++++ .../openssh/openssh_10.3p1.bb | 1 + 2 files changed, 81 insertions(+) create mode 100644 meta/recipes-connectivity/openssh/openssh/CVE-2026-73281.patch
meta/recipes-connectivity/openssh/openssh/CVE-2026-73281.patch new file +80 -0
@@ -0,0 +1,80 @@ +From 6a57081dc35acf3ee298108d4bc3580489608d5 Mon Sep 17 00:00:00 2001 +From: "[email protected]" <[email protected]> +Date: Fri, 7 Aug 2026 05:18:05 +0000 +Subject: [PATCH] upstream: Allow [email protected] requests when the + agent is + +locked, otherwise forwarding sessions established with an agent was locked +will be treated as local, rather than remote. + +Reported by sn0x-sharma + +OpenBSD-Commit-ID: 524f210c6f2b3a06e0a2f6d0af5188a9a75fa2c7 + +CVE: CVE-2026-73281 +Upstream-Status: Backport [https://github.com/openssh/openssh-portable/commit/6a57081dc35acf3ee298108d4bc3580489608d5] + +Backport Changes: +- Omitted the upstream OpenBSD revision-only hunk and retained the Wrynose + OpenSSH 10.3p1 revision. +- OpenSSH 10.3p1 lacks the later `replied` result tracking in + process_extension(), so retained `success = process_ext_query(e)`. + +(cherry picked from commit 6a57081dc35acf3ee298108d4bc3580489608d5) +Signed-off-by: Hetvi Thakar <[email protected]> +--- + ssh-agent.c | 23 +++++++++++++++++++---- + 1 file changed, 18 insertions(+), 5 deletions(-) + +diff --git a/ssh-agent.c b/ssh-agent.c +index 5fc73d69..1604f540 100644 +--- a/ssh-agent.c ++++ b/ssh-agent.c +@@ -1795,12 +1795,22 @@ + return; + } + +- if (strcmp(name, "query") == 0) +- success = process_ext_query(e); +- else if (strcmp(name, "[email protected]") == 0) ++ /* ++ * This function can be called while the agent is locked to allow ++ * session binds to be processed for new channels. ++ * Other operations should be refused when locked. ++ */ ++ ++ if (strcmp(name, "[email protected]") == 0) { + success = process_ext_session_bind(e); +- else { ++ } else if (locked) { ++ debug_f("attempt to use extension \"%s\" while locked", name); ++ goto generic_fail; ++ } else if (strcmp(name, "query") == 0) { ++ success = process_ext_query(e); ++ } else { + debug_f("unsupported extension \"%s\"", name); ++ generic_fail: + free(name); + send_status(e, 0); + return; +@@ -1857,14 +1867,17 @@ + /* check whether agent is locked */ + if (locked && type != SSH_AGENTC_UNLOCK) { +- sshbuf_reset(e->request); + switch (type) { + case SSH2_AGENTC_REQUEST_IDENTITIES: + /* send empty lists */ + no_identities(e); + break; ++ case SSH_AGENTC_EXTENSION: ++ process_extension(e); ++ break; + default: + /* send a fail message for all other request types */ + send_status(e, 0); + } ++ sshbuf_reset(e->request); + return 1; + } +-- +2.43.0
meta/recipes-connectivity/openssh/openssh_10.3p1.bb +1 -0
@@ -33,6 +33,7 @@ SRC_URI = "https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.ta file://CVE-2026-60000.patch \ file://CVE-2026-73283.patch \ file://CVE-2026-73282.patch \ + file://CVE-2026-73281.patch \ " SRC_URI[sha256sum] = "56682a36bb92dcf4b4f016fd8ec8e74059b79a8de25c15d670d731e7d18e45f4"
Signature · 1 line
2.35.6