package/openssh: upstream patch for various CVEs
PATCH 1/1 package/openssh: upstream patch for various CVEs
Commit on master [1] fixed a number of vulnerabilities but the 2025.02.x branch is still on OpenSSH v9.9p2.
This commit fixes the following vulnerabilities by backporting upstream patches:
- CVE-2026-59995:
sftp in OpenSSH before 10.4 does not properly constrain the location of downloaded files when "sftp server:/path ." is used with an attacker-controlled server.
For more information, see:
- https://www.cve.org/CVERecord?id=CVE-2026-59995
- https://github.com/openssh/openssh-portable/commit/1b39f39657d2e58f8ec57341581a39bbf0be645b
- CVE-2026-59996:
scp in OpenSSH before 10.4 may place a file in the parent directory of an intended directory when the copy occurs between two remote destinations.
For more information, see:
- https://github.com/openssh/openssh-portable/commit/36480181fa22f98e180b4f9e10203480c0346c78
- https://www.cve.org/CVERecord?id=CVE-2026-59996
- CVE-2026-59997:
internal-sftp in sshd in OpenSSH before 10.4 recognizes only the first 9 command-line arguments, which can be important if a later command- line argument would have helped to ensure the intended security properties of an SFTP connection.
For more information, see:
- https://www.cve.org/CVERecord?id=CVE-2026-59997
- https://github.com/openssh/openssh-portable/commit/e9916c44c1324ab9ab022719e4df08a390a83014
- CVE-2026-59999:
In sshd in OpenSSH before 10.4, DisableForwarding=yes was supposed to take precedence over PermitTunnel=yes, but did not.
For more information, see:
- https://www.cve.org/CVERecord?id=CVE-2026-59999
- https://github.com/openssh/openssh-portable/commit/c805b97b67c774e0bf922ffb29dfbcda9d7b5add
- CVE-2026-60000:
sshd in OpenSSH before 10.4 allows remote attackers to cause a denial of service (resource consumption from excessive authentication attempts) because MaxAuthTries was mishandled for GSSAPIAuthentication.
For more information, see:
- https://www.cve.org/CVERecord?id=CVE-2026-60000
- https://github.com/openssh/openssh-portable/commit/5d04ca6af739b82fd30d84d2783ca802ebfa1192
- CVE-2026-60001:
sshd in OpenSSH before 10.4 does not always honor the minimum authentication delay.
For more information, see:
- https://www.cve.org/CVERecord?id=CVE-2026-60001
- https://github.com/openssh/openssh-portable/commit/d43ba60c91cb323ca921049b7d43b1908c318454
- CVE-2026-60002:
ssh in OpenSSH before 10.4 can have a use-after-free when a server changes its host key during a key re-exchange. (This outcome occurs only on the client side.)
For more information, see:
- https://www.cve.org/CVERecord?id=CVE-2026-60002
- https://github.com/openssh/openssh-portable/commit/e8bdfb151a356d0171fea4194dd205fbb252be23
The CVE-2026-59998 is windows specific and thus ignored.
[1] 90add0c09e package/openssh: security bump to version 10.4p1
--- package/openssh/0012-CVE-2026-59995.patch | 36 ++++ package/openssh/0013-CVE-2026-59996.patch | 31 ++++ package/openssh/0014-CVE-2026-59997.patch | 52 ++++++ package/openssh/0015-CVE-2026-59999.patch | 30 +++ package/openssh/0016-CVE-2026-60000.patch | 132 +++++++++++++ package/openssh/0017-CVE-2026-60001.patch | 121 ++++++++++++ package/openssh/0018-CVE-2026-60002.patch | 216 ++++++++++++++++++++++ package/openssh/openssh.mk | 16 ++ 8 files changed, 634 insertions(+) create mode 100644 package/openssh/0012-CVE-2026-59995.patch create mode 100644 package/openssh/0013-CVE-2026-59996.patch create mode 100644 package/openssh/0014-CVE-2026-59997.patch create mode 100644 package/openssh/0015-CVE-2026-59999.patch create mode 100644 package/openssh/0016-CVE-2026-60000.patch create mode 100644 package/openssh/0017-CVE-2026-60001.patch create mode 100644 package/openssh/0018-CVE-2026-60002.patch
package/openssh/0012-CVE-2026-59995.patch new file +36 -0
@@ -0,0 +1,36 @@ +From 1b39f39657d2e58f8ec57341581a39bbf0be645b Mon Sep 17 00:00:00 2001 +From: "[email protected]" <[email protected]> +Date: Mon, 29 Jun 2026 01:47:21 +0000 +Subject: [PATCH] upstream: avoid download to server-controlled path when + performing + +download on the commandline. From Swival scanner + +OpenBSD-Commit-ID: d1b2c44305fdfe6d51eed9ecc727e59478bf311f +CVE: CVE-2026-59995 +Upstream: https://github.com/openssh/openssh-portable/commit/1b39f39657d2e58f8ec57341581a39bbf0be645b +Signed-off-by: Thomas Perale <[email protected]> +--- + sftp.c | 11 +++-------- + 1 file changed, 3 insertions(+), 8 deletions(-) + +diff --git a/sftp.c b/sftp.c +index 0ab9206c2772..0b57e083398c 100644 +--- a/sftp.c ++++ b/sftp.c +@@ -2270,13 +2270,8 @@ interactive_loop(struct sftp_conn *conn, char *file1, char *file2) + return (-1); + } + } else { +- /* XXX this is wrong wrt quoting */ +- snprintf(cmd, sizeof cmd, "get%s %s%s%s", +- global_aflag ? " -a" : "", dir, +- file2 == NULL ? "" : " ", +- file2 == NULL ? "" : file2); +- err = parse_dispatch_command(conn, cmd, +- &remote_path, startdir, 1, 0); ++ err = process_get(conn, dir, file2, remote_path, 0, 0, ++ global_aflag, 0); + free(dir); + free(startdir); + free(remote_path);
package/openssh/0013-CVE-2026-59996.patch new file +31 -0
@@ -0,0 +1,31 @@ +From 36480181fa22f98e180b4f9e10203480c0346c78 Mon Sep 17 00:00:00 2001 +From: "[email protected]" <[email protected]> +Date: Sun, 28 Jun 2026 23:47:16 +0000 +Subject: [PATCH] upstream: resist that return ".." via remote glob during + +remote/remote copies, similar to fixes for bz3871 for remote/local copies. +From Swival scanner + +OpenBSD-Commit-ID: c0c20a1b746db55c08e53658bf21ea9405b300a5 +CVE: CVE-2026-59996 +Upstream: https://github.com/openssh/openssh-portable/commit/36480181fa22f98e180b4f9e10203480c0346c78 +Signed-off-by: Thomas Perale <[email protected]> +--- + scp.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/scp.c b/scp.c +index 621db83c02d1..28ac7a29d2a3 100644 +--- a/scp.c ++++ b/scp.c +@@ -2045,6 +2045,10 @@ throughlocal_sftp(struct sftp_conn *from, struct sftp_conn *to, + goto out; + } + ++ /* Special handling for source of '..' */ ++ if (strcmp(filename, "..") == 0) ++ filename = "."; /* Download to dest, not dest/.. */ ++ + if (targetisdir) + abs_dst = sftp_path_append(target, filename); + else
package/openssh/0014-CVE-2026-59997.patch new file +52 -0
52 lines not on this page · raw message
package/openssh/0015-CVE-2026-59999.patch new file +30 -0
@@ -0,0 +1,30 @@ +From 8dfe7ed6e2fd988de08df508355a196b956b2753 Mon Sep 17 00:00:00 2001 +From: "[email protected]" <[email protected]> +Date: Sun, 31 May 2026 04:47:29 +0000 +Subject: [PATCH] upstream: DisableForwarding=yes didn't override + PermitTunnel=yes + +Reported independently by Huzaifa Sidhpurwala of Redhat and Marko +Jevtic; ok markus@ + +OpenBSD-Commit-ID: b5c13f0746cf079b21f8deba47407fad49ccbf4c +CVE: CVE-2026-59999 +Upstream: https://github.com/openssh/openssh-portable/commit/c805b97b67c774e0bf922ffb29dfbcda9d7b5add +Signed-off-by: Thomas Perale <[email protected]> +--- + serverloop.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/serverloop.c b/serverloop.c +index 8e63480ecefa..8a6e3db8024e 100644 +--- a/serverloop.c ++++ b/serverloop.c +@@ -498,7 +498,7 @@ server_request_tun(struct ssh *ssh) + ssh_packet_send_debug(ssh, "Unsupported tunnel device mode."); + return NULL; + } +- if ((options.permit_tun & mode) == 0) { ++ if ((options.permit_tun & mode) == 0 || options.disable_forwarding) { + ssh_packet_send_debug(ssh, "Server has rejected tunnel device " + "forwarding"); + return NULL;
package/openssh/0016-CVE-2026-60000.patch new file +132 -0
132 lines not on this page · raw message
package/openssh/0017-CVE-2026-60001.patch new file +121 -0
121 lines not on this page · raw message
package/openssh/0018-CVE-2026-60002.patch new file +216 -0
216 lines not on this page · raw message
package/openssh/openssh.mk +16 -0
@@ -32,6 +32,22 @@ OPENSSH_IGNORE_CVES += CVE-2026-35387 OPENSSH_IGNORE_CVES += CVE-2026-35388 # 0011-CVE-2026-35414.patch OPENSSH_IGNORE_CVES += CVE-2026-35414 +# 0012-CVE-2026-59995.patch +OPENSSH_IGNORE_CVES += CVE-2026-59995 +# 0013-CVE-2026-59996.patch +OPENSSH_IGNORE_CVES += CVE-2026-59996 +# 0014-CVE-2026-59997.patch +OPENSSH_IGNORE_CVES += CVE-2026-59997 +# Windows Specific (see https://nvd.nist.gov/vuln/detail/CVE-2026-59998) +OPENSSH_IGNORE_CVES += CVE-2026-59998 +# 0015-CVE-2026-59999.patch +OPENSSH_IGNORE_CVES += CVE-2026-59999 +# 0016-CVE-2026-60000.patch +OPENSSH_IGNORE_CVES += CVE-2026-60000 +# 0017-CVE-2026-60001.patch +OPENSSH_IGNORE_CVES += CVE-2026-60001 +# 0018-CVE-2026-60002.patch +OPENSSH_IGNORE_CVES += CVE-2026-60002 OPENSSH_CONF_ENV = \ LD="$(TARGET_CC)" \
Signature · 6 lines
2.55.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot