package/openssh: fix CVE-2026-73281, CVE-2026-73282 and CVE-2026-73283
PATCH 1/1 package/openssh: fix CVE-2026-73281, CVE-2026-73282 and CVE-2026-73283
Backport three upstream security fixes to OpenSSH 9.9p2:
- CVE-2026-73281: allow [email protected] requests while ssh-agent is locked so forwarded connections are correctly tracked as remote, while continuing to reject other locked-agent operations.
- CVE-2026-73282: avoid a use-after-free when adding a remote forward through the multiplexing socket reallocates the forwarding list. Store a forwarding index rather than a pointer in the confirmation callback context.
- CVE-2026-73283: make the authorized_keys restrict option block tunnel forwarding, preserving the existing CVE-2026-59999 DisableForwarding check.
Keep each fix in a separate package patch, adapt the changes to the 9.9p2 sources and mark the three CVEs as fixed in OPENSSH_IGNORE_CVES.
Upstream:
https://github.com/openssh/openssh-portable/commit/6a57081dc35acf3ee298108d4bc3580489608d5f
https://github.com/openssh/openssh-portable/commit/9910d5ef53124ce1157d57bc11e222658aa41299
https://github.com/openssh/openssh-portable/commit/d322f2ccf7da095ce94d1d99cb563246f61487b0
--- package/openssh/0022-CVE-2026-73281.patch | 70 ++++++++++++++++++++++ package/openssh/0023-CVE-2026-73282.patch | 72 +++++++++++++++++++++++ package/openssh/0024-CVE-2026-73283.patch | 35 +++++++++++ package/openssh/openssh.mk | 6 ++ 4 files changed, 183 insertions(+) create mode 100644 package/openssh/0022-CVE-2026-73281.patch create mode 100644 package/openssh/0023-CVE-2026-73282.patch create mode 100644 package/openssh/0024-CVE-2026-73283.patch
package/openssh/0022-CVE-2026-73281.patch new file +70 -0
@@ -0,0 +1,70 @@ +From 6a57081dc35acf3ee298108d4bc3580489608d5f 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 while an agent was locked +will be treated as local, rather than remote. + +Reported by sn0x-sharma + +Backport to OpenSSH 9.9p2: omit the OpenBSD revision update and adapt +to the existing extension dispatcher, which has no query extension or +replied/generic_fail handling. Keep its failure reply for all extensions +other than session-bind while locked. + +OpenBSD-Commit-ID: 524f210c6f2b3a06e0a2f6d0af5188a9a75fa2c7 +CVE: CVE-2026-73281 +Upstream: https://github.com/openssh/openssh-portable/commit/6a57081dc35acf3ee298108d4bc3580489608d5f +Signed-off-by: Fred Lefranc <[email protected]> +--- + ssh-agent.c | 18 +++++++++++++++--- + 1 file changed, 15 insertions(+), 3 deletions(-) + +diff --git a/ssh-agent.c b/ssh-agent.c +--- a/ssh-agent.c ++++ b/ssh-agent.c +@@ -1782,10 +1782,19 @@ process_extension(SocketEntry *e) + error_fr(r, "parse"); + goto send; + } +- 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); ++ } else { + debug_f("unsupported extension \"%s\"", name); ++ } + free(name); + send: + send_status(e, success); +@@ -1835,16 +1844,19 @@ process_message(u_int socknum) + + /* 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; + } +
package/openssh/0023-CVE-2026-73282.patch new file +72 -0
72 lines not on this page · raw message
package/openssh/0024-CVE-2026-73283.patch new file +35 -0
@@ -0,0 +1,35 @@ +From d322f2ccf7da095ce94d1d99cb563246f61487b0 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 + +Tunnel forwarding is administratively disabled by default. + +Reported by Erichen, Institute of Computing Technology, +Chinese Academy of Sciences + +Backport to OpenSSH 9.9p2: omit the OpenBSD revision update and rebase +on 0015-CVE-2026-59999.patch, preserving its DisableForwarding check. + +OpenBSD-Commit-ID: 5b3cc987a64749c94b20e12755db32a83f8f01e6 +CVE: CVE-2026-73283 +Upstream: https://github.com/openssh/openssh-portable/commit/d322f2ccf7da095ce94d1d99cb563246f61487b0 +Signed-off-by: Fred Lefranc <[email protected]> +--- + serverloop.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/serverloop.c b/serverloop.c +--- a/serverloop.c ++++ b/serverloop.c +@@ -498,7 +498,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;
package/openssh/openssh.mk +6 -0
@@ -53,6 +53,12 @@ OPENSSH_IGNORE_CVES += CVE-2026-106583 # 0021-avoid-password-authn-bypass.patch OPENSSH_IGNORE_CVES += CVE-2026-123158 +# 0022-CVE-2026-73281.patch +OPENSSH_IGNORE_CVES += CVE-2026-73281 +# 0023-CVE-2026-73282.patch +OPENSSH_IGNORE_CVES += CVE-2026-73282 +# 0024-CVE-2026-73283.patch +OPENSSH_IGNORE_CVES += CVE-2026-73283 OPENSSH_CONF_ENV = \ LD="$(TARGET_CC)" \
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Raphaël Mélotte via buildroot
AppliedIn reply of:
Quoted 15 lines
Backport three upstream security fixes to OpenSSH 9.9p2:
- CVE-2026-73281: allow [email protected] requests while ssh-agent is locked so forwarded connections are correctly tracked as remote, while continuing to reject other locked-agent operations.
- CVE-2026-73282: avoid a use-after-free when adding a remote forward through the multiplexing socket reallocates the forwarding list. Store a forwarding index rather than a pointer in the confirmation callback context.
- CVE-2026-73283: make the
authorized_keysrestrict option block tunnel forwarding, preserving the existing CVE-2026-59999 DisableForwarding check.
Quoted 8 lines
Keep each fix in a separate package patch, adapt the changes to the 9.9p2 sources and mark the three CVEs as fixed in
OPENSSH_IGNORE_CVES.Upstream:
https://github.com/openssh/openssh-portable/commit/6a57081dc35acf3ee298108d4bc3580489608d5f
https://github.com/openssh/openssh-portable/commit/9910d5ef53124ce1157d57bc11e222658aa41299
https://github.com/openssh/openssh-portable/commit/d322f2ccf7da095ce94d1d99cb563246f61487b0Signed-off-by Fred Lefranc <[email protected]>
Applied to 2025.02.x. Thanks
Quoted 212 lines
--- package/openssh/0022-CVE-2026-73281.patch | 70 ++++++++++++++++++++++ package/openssh/0023-CVE-2026-73282.patch | 72 +++++++++++++++++++++++ package/openssh/0024-CVE-2026-73283.patch | 35 +++++++++++ package/openssh/openssh.mk | 6 ++ 4 files changed, 183 insertions(+) create mode 100644 package/openssh/0022-CVE-2026-73281.patch create mode 100644 package/openssh/0023-CVE-2026-73282.patch create mode 100644 package/openssh/0024-CVE-2026-73283.patchpackage/openssh/0022-CVE-2026-73281.patch new file +70
-0@@ -0,0 +1,70 @@ +From 6a57081dc35acf3ee298108d4bc3580489608d5f 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 while an agent was locked +will be treated as local, rather than remote. + +Reported by sn0x-sharma + +Backport to OpenSSH 9.9p2: omit the OpenBSD revision update and adapt +to the existing extension dispatcher, which has no query extension or +replied/generic_fail handling. Keep its failure reply for all extensions +other than session-bind while locked. + +OpenBSD-Commit-ID: 524f210c6f2b3a06e0a2f6d0af5188a9a75fa2c7 +CVE: CVE-2026-73281 +Upstream: https://github.com/openssh/openssh-portable/commit/6a57081dc35acf3ee298108d4bc3580489608d5f +Signed-off-by: Fred Lefranc <[email protected]> +--- + ssh-agent.c | 18 +++++++++++++++--- + 1 file changed, 15 insertions(+), 3 deletions(-) + +diff --git a/ssh-agent.c b/ssh-agent.c +--- a/ssh-agent.c ++++ b/ssh-agent.c +@@ -1782,10 +1782,19 @@ process_extension(SocketEntry *e) + error_fr(r, "parse"); + goto send; + } +- 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); ++ } else { + debug_f("unsupported extension \"%s\"", name); ++ } + free(name); + send: + send_status(e, success); +@@ -1835,16 +1844,19 @@ process_message(u_int socknum) + + /* 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; + } +package/openssh/0023-CVE-2026-73282.patch new file +72
-0@@ -0,0 +1,72 @@ +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 + +A remote forwarding may be 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 + +Backport to OpenSSH 9.9p2: omit the OpenBSD revision update, rebase the +functional hunks and retain the u_int32_t callback argument type. + +OpenBSD-Commit-ID: c7888d566576386d0e96859f9ec7310a1e2d3609 +CVE: CVE-2026-73282 +Upstream: https://github.com/openssh/openssh-portable/commit/9910d5ef53124ce1157d57bc11e222658aa41299 +Signed-off-by: Fred Lefranc <[email protected]> +--- + ssh.c | 19 ++++++++++++++++--- + 1 file changed, 16 insertions(+), 3 deletions(-) + +diff --git a/ssh.c b/ssh.c +--- a/ssh.c ++++ b/ssh.c +@@ -1840,14 +1840,24 @@ forwarding_success(void) + } + } + ++struct rfwd_confirm_ctx { ++ int fid; ++}; ++ + /* Callback for remote forward global requests */ + static void + ssh_confirm_remote_forward(struct ssh *ssh, int type, u_int32_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", +@@ -2025,6 +2035,8 @@ ssh_init_forwarding(struct ssh *ssh, char **ifname) + + /* 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) ? +@@ -2039,9 +2051,10 @@ ssh_init_forwarding(struct ssh *ssh, char **ifname) + 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.");package/openssh/0024-CVE-2026-73283.patch new file +35
-0@@ -0,0 +1,35 @@ +From d322f2ccf7da095ce94d1d99cb563246f61487b0 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 + +Tunnel forwarding is administratively disabled by default. + +Reported by Erichen, Institute of Computing Technology, +Chinese Academy of Sciences + +Backport to OpenSSH 9.9p2: omit the OpenBSD revision update and rebase +on 0015-CVE-2026-59999.patch, preserving its DisableForwarding check. + +OpenBSD-Commit-ID: 5b3cc987a64749c94b20e12755db32a83f8f01e6 +CVE: CVE-2026-73283 +Upstream: https://github.com/openssh/openssh-portable/commit/d322f2ccf7da095ce94d1d99cb563246f61487b0 +Signed-off-by: Fred Lefranc <[email protected]> +--- + serverloop.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/serverloop.c b/serverloop.c +--- a/serverloop.c ++++ b/serverloop.c +@@ -498,7 +498,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;package/openssh/openssh.mk +0
-0@@ -53,6 +53,12 @@ OPENSSH_IGNORE_CVES += CVE-2026-106583 # 0021-avoid-password-authn-bypass.patch
package/openssh/openssh.mk OPENSSH_IGNORE_CVES += CVE-2026-106583 · line 64
Quoted 10 lines
package/openssh/openssh.mk +6
-0OPENSSH_IGNORE_CVES += CVE-2026-123158 +# 0022-CVE-2026-73281.patch +OPENSSH_IGNORE_CVES += CVE-2026-73281 +# 0023-CVE-2026-73282.patch +OPENSSH_IGNORE_CVES += CVE-2026-73282 +# 0024-CVE-2026-73283.patch +OPENSSH_IGNORE_CVES += CVE-2026-73283 OPENSSH_CONF_ENV = \ LD="$(TARGET_CC)" \
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot