package/openssh: fix CVE-2026-106583
PATCH 1/1 package/openssh: fix CVE-2026-106583
From: Fred Lefranc <[email protected]>
In ssh in OpenSSH before 10.6, a $ or \ character can occur in a command-line username, leading to injection.
https://www.cve.org/CVERecord?id=CVE-2026-106583
--- package/openssh/0019-CVE-2026-106583.patch | 41 ++++++++++++++++++++++ package/openssh/openssh.mk | 2 ++ 2 files changed, 43 insertions(+) create mode 100644 package/openssh/0019-CVE-2026-106583.patch
package/openssh/0019-CVE-2026-106583.patch new file +41 -0
@@ -0,0 +1,41 @@ +From 0c4c9a7b320bd7ff61c4a2dc345cb2e27e9663b2 Mon Sep 17 00:00:00 2001 +From: "[email protected]" <[email protected]> +Date: Mon, 5 Oct 2026 06:03:40 +0000 +Subject: [PATCH] upstream: Further restrict the characters allowed in a + command-line + +supplied user name, disallowing '$' and '\'. Reported by SecBuddyF KeenLab +Tencent (CodeBuddy Security). + +Backport to OpenSSH 9.9p2 with the existing username validation patches: +drop the OpenBSD revision update and rebase the functional hunk. + +OpenBSD-Commit-ID: 13671c178f492af63b5c1296f284818c7809ed9a +CVE: CVE-2026-106583 +Upstream: https://github.com/openssh/openssh-portable/commit/0c4c9a7b320bd7ff61c4a2dc345cb2e27e9663b2 +Signed-off-by: Copilot <[email protected]> +--- + readconf.c | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/readconf.c b/readconf.c +--- a/readconf.c ++++ b/readconf.c +@@ -3319,14 +3319,11 @@ ssh_valid_ruser(const char *s) + for (i = 0; s[i] != 0; i++) { + if (iscntrl((u_char)s[i])) + return 0; +- if (strchr("'`\";&<>|(){}", s[i]) != NULL) ++ if (strchr("'`\";&<>|(){}$\\", s[i]) != NULL) + return 0; + /* Disallow '-' after whitespace */ + if (isspace((u_char)s[i]) && s[i + 1] == '-') + return 0; +- /* Disallow \ in last position */ +- if (s[i] == '\\' && s[i + 1] == '\0') +- return 0; + } + return 1; + } +-- +2.34.1
package/openssh/openssh.mk +2 -0
@@ -48,6 +48,8 @@ OPENSSH_IGNORE_CVES += CVE-2026-60000 OPENSSH_IGNORE_CVES += CVE-2026-60001 # 0018-CVE-2026-60002.patch OPENSSH_IGNORE_CVES += CVE-2026-60002 +# 0019-CVE-2026-106583.patch +OPENSSH_IGNORE_CVES += CVE-2026-106583 OPENSSH_CONF_ENV = \ LD="$(TARGET_CC)" \
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Fred,
Thanks for the submission.
In reply of:
Quoted 23 lines
In ssh in OpenSSH before 10.6, a $ or \ character can occur in a command-line username, leading to injection.
https://www.cve.org/CVERecord?id=CVE-2026-106583
Signed-off-by Fred Lefranc <[email protected]>--- package/openssh/0019-CVE-2026-106583.patch | 41 ++++++++++++++++++++++ package/openssh/openssh.mk | 2 ++ 2 files changed, 43 insertions(+) create mode 100644 package/openssh/0019-CVE-2026-106583.patchpackage/openssh/0019-CVE-2026-106583.patch new file +6
-0@@ -0,0 +1,41 @@ +From 0c4c9a7b320bd7ff61c4a2dc345cb2e27e9663b2 Mon Sep 17 00:00:00 2001 +From: "[email protected]" <[email protected]> +Date: Mon, 5 Oct 2026 06:03:40 +0000 +Subject: [PATCH] upstream: Further restrict the characters allowed in a + command-line +
package/openssh/0019-CVE-2026-106583.patch line 16
Quoted 10 lines
package/openssh/0019-CVE-2026-106583.patch new file +10
-0+supplied user name, disallowing '$' and '\'. Reported by SecBuddyF KeenLab +Tencent (CodeBuddy Security). + +Backport to OpenSSH 9.9p2 with the existing username validation patches: +drop the OpenBSD revision update and rebase the functional hunk. + +OpenBSD-Commit-ID: 13671c178f492af63b5c1296f284818c7809ed9a +CVE: CVE-2026-106583 +Upstream: https://github.com/openssh/openssh-portable/commit/0c4c9a7b320bd7ff61c4a2dc345cb2e27e9663b2 +Signed-off-by: Copilot <[email protected]>
Can you confirm me you accept that I set your "Signed-off-by" here instead of the 'copilot' one.
Best Regards,
PERALE Thomas
Quoted 45 lines
package/openssh/0019-CVE-2026-106583.patch new file +25
-0+--- + readconf.c | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/readconf.c b/readconf.c +--- a/readconf.c ++++ b/readconf.c +@@ -3319,14 +3319,11 @@ ssh_valid_ruser(const char *s) + for (i = 0; s[i] != 0; i++) { + if (iscntrl((u_char)s[i])) + return 0; +- if (strchr("'`\";&<>|(){}", s[i]) != NULL) ++ if (strchr("'`\";&<>|(){}$\\", s[i]) != NULL) + return 0; + /* Disallow '-' after whitespace */ + if (isspace((u_char)s[i]) && s[i + 1] == '-') + return 0; +- /* Disallow \ in last position */ +- if (s[i] == '\\' && s[i + 1] == '\0') +- return 0; + } + return 1; + } +-- +2.34.1package/openssh/openssh.mk +2
-0@@ -48,6 +48,8 @@ OPENSSH_IGNORE_CVES += CVE-2026-60000 OPENSSH_IGNORE_CVES += CVE-2026-60001 # 0018-CVE-2026-60002.patch OPENSSH_IGNORE_CVES += CVE-2026-60002 +# 0019-CVE-2026-106583.patch +OPENSSH_IGNORE_CVES += CVE-2026-106583 OPENSSH_CONF_ENV = \ LD="$(TARGET_CC)" \Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Raphaël Mélotte via buildroot
AppliedIn reply of:
Quoted 4 lines
In ssh in OpenSSH before 10.6, a $ or \ character can occur in a command-line username, leading to injection.
https://www.cve.org/CVERecord?id=CVE-2026-106583
Signed-off-by Fred Lefranc <[email protected]>
Applied to 2025.02.x. Thanks
Quoted 58 lines
--- package/openssh/0019-CVE-2026-106583.patch | 41 ++++++++++++++++++++++ package/openssh/openssh.mk | 2 ++ 2 files changed, 43 insertions(+) create mode 100644 package/openssh/0019-CVE-2026-106583.patchpackage/openssh/0019-CVE-2026-106583.patch new file +41
-0@@ -0,0 +1,41 @@ +From 0c4c9a7b320bd7ff61c4a2dc345cb2e27e9663b2 Mon Sep 17 00:00:00 2001 +From: "[email protected]" <[email protected]> +Date: Mon, 5 Oct 2026 06:03:40 +0000 +Subject: [PATCH] upstream: Further restrict the characters allowed in a + command-line + +supplied user name, disallowing '$' and '\'. Reported by SecBuddyF KeenLab +Tencent (CodeBuddy Security). + +Backport to OpenSSH 9.9p2 with the existing username validation patches: +drop the OpenBSD revision update and rebase the functional hunk. + +OpenBSD-Commit-ID: 13671c178f492af63b5c1296f284818c7809ed9a +CVE: CVE-2026-106583 +Upstream: https://github.com/openssh/openssh-portable/commit/0c4c9a7b320bd7ff61c4a2dc345cb2e27e9663b2 +Signed-off-by: Copilot <[email protected]> +--- + readconf.c | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/readconf.c b/readconf.c +--- a/readconf.c ++++ b/readconf.c +@@ -3319,14 +3319,11 @@ ssh_valid_ruser(const char *s) + for (i = 0; s[i] != 0; i++) { + if (iscntrl((u_char)s[i])) + return 0; +- if (strchr("'`\";&<>|(){}", s[i]) != NULL) ++ if (strchr("'`\";&<>|(){}$\\", s[i]) != NULL) + return 0; + /* Disallow '-' after whitespace */ + if (isspace((u_char)s[i]) && s[i + 1] == '-') + return 0; +- /* Disallow \ in last position */ +- if (s[i] == '\\' && s[i + 1] == '\0') +- return 0; + } + return 1; + } +-- +2.34.1package/openssh/openssh.mk +0
-0
package/openssh/openssh.mk OPENSSH_IGNORE_CVES += CVE-2026-60000 · line 55
Quoted 8 lines
package/openssh/openssh.mk +2
-0@@ -48,6 +48,8 @@ OPENSSH_IGNORE_CVES += CVE-2026-60000 OPENSSH_IGNORE_CVES += CVE-2026-60001 # 0018-CVE-2026-60002.patch OPENSSH_IGNORE_CVES += CVE-2026-60002 +# 0019-CVE-2026-106583.patch +OPENSSH_IGNORE_CVES += CVE-2026-106583 OPENSSH_CONF_ENV = \ LD="$(TARGET_CC)" \
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hi,
In reply of:
Quoted 4 lines
In ssh in OpenSSH before 10.6, a $ or \ character can occur in a command-line username, leading to injection.
https://www.cve.org/CVERecord?id=CVE-2026-106583
Signed-off-by Fred Lefranc <[email protected]>
Applied on 2025.02.x, thanks !
Best regards,
PERALE Thomas
Quoted 73 lines
--- package/openssh/0019-CVE-2026-106583.patch | 41 ++++++++++++++++++++++ package/openssh/openssh.mk | 2 ++ 2 files changed, 43 insertions(+) create mode 100644 package/openssh/0019-CVE-2026-106583.patchpackage/openssh/0019-CVE-2026-106583.patch new file +41
-0@@ -0,0 +1,41 @@ +From 0c4c9a7b320bd7ff61c4a2dc345cb2e27e9663b2 Mon Sep 17 00:00:00 2001 +From: "[email protected]" <[email protected]> +Date: Mon, 5 Oct 2026 06:03:40 +0000 +Subject: [PATCH] upstream: Further restrict the characters allowed in a + command-line + +supplied user name, disallowing '$' and '\'. Reported by SecBuddyF KeenLab +Tencent (CodeBuddy Security). + +Backport to OpenSSH 9.9p2 with the existing username validation patches: +drop the OpenBSD revision update and rebase the functional hunk. + +OpenBSD-Commit-ID: 13671c178f492af63b5c1296f284818c7809ed9a +CVE: CVE-2026-106583 +Upstream: https://github.com/openssh/openssh-portable/commit/0c4c9a7b320bd7ff61c4a2dc345cb2e27e9663b2 +Signed-off-by: Copilot <[email protected]> +--- + readconf.c | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/readconf.c b/readconf.c +--- a/readconf.c ++++ b/readconf.c +@@ -3319,14 +3319,11 @@ ssh_valid_ruser(const char *s) + for (i = 0; s[i] != 0; i++) { + if (iscntrl((u_char)s[i])) + return 0; +- if (strchr("'`\";&<>|(){}", s[i]) != NULL) ++ if (strchr("'`\";&<>|(){}$\\", s[i]) != NULL) + return 0; + /* Disallow '-' after whitespace */ + if (isspace((u_char)s[i]) && s[i + 1] == '-') + return 0; +- /* Disallow \ in last position */ +- if (s[i] == '\\' && s[i + 1] == '\0') +- return 0; + } + return 1; + } +-- +2.34.1package/openssh/openssh.mk +2
-0@@ -48,6 +48,8 @@ OPENSSH_IGNORE_CVES += CVE-2026-60000 OPENSSH_IGNORE_CVES += CVE-2026-60001 # 0018-CVE-2026-60002.patch OPENSSH_IGNORE_CVES += CVE-2026-60002 +# 0019-CVE-2026-106583.patch +OPENSSH_IGNORE_CVES += CVE-2026-106583 OPENSSH_CONF_ENV = \ LD="$(TARGET_CC)" \Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot