public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/openssh] rawhide: Enabling pure ML-DSA keys for SSH
@ 2026-11-04 12:14 Dmitry Belyavskiy
0 siblings, 0 replies; only message in thread
From: Dmitry Belyavskiy @ 2026-11-04 12:14 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/openssh
Branch : rawhide
Commit : 1db1544d99d19804ec29f1c40a2a949238b022a3
Author : Dmitry Belyavskiy <dbelyavs@redhat.com>
Date : 2026-11-04T12:59:14+01:00
Stats : +1653/-199 in 56 file(s)
URL : https://src.fedoraproject.org/rpms/openssh/c/1db1544d99d19804ec29f1c40a2a949238b022a3?branch=rawhide
Log:
Enabling pure ML-DSA keys for SSH
---
diff --git a/0001-openssh-6.7p1-coverity.patch b/0001-openssh-6.7p1-coverity.patch
index 29717e2..75002fe 100644
--- a/0001-openssh-6.7p1-coverity.patch
+++ b/0001-openssh-6.7p1-coverity.patch
@@ -1,9 +1,10 @@
-From bbc321ac230fc4d16357c598e9b1e1650b913b25 Mon Sep 17 00:00:00 2001
+From 268161f04f660a25bbe0bade42a3b7c2efc16259 Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Fri, 7 Aug 2026 17:25:07 +0200
-Subject: [PATCH 01/53] openssh-6.7p1-coverity
+Subject: [PATCH 01/55] openssh-6.7p1-coverity
---
+ gss-serv.c | 4 +++-
krl.c | 3 +++
loginrec.c | 2 ++
misc.c | 3 +++
@@ -13,8 +14,32 @@ Subject: [PATCH 01/53] openssh-6.7p1-coverity
readconf.c | 1 +
servconf.c | 5 +++--
serverloop.c | 2 +-
- 9 files changed, 20 insertions(+), 10 deletions(-)
+ 10 files changed, 23 insertions(+), 11 deletions(-)
+diff --git a/gss-serv.c b/gss-serv.c
+index 16f653202..92247cf51 100644
+--- a/gss-serv.c
++++ b/gss-serv.c
+@@ -279,7 +279,7 @@ ssh_gssapi_getclient(Gssctxt *ctx, ssh_gssapi_client *client)
+ {
+ int i = 0;
+
+- gss_buffer_desc ename;
++ gss_buffer_desc ename = GSS_C_EMPTY_BUFFER;
+
+ client->userok = 0;
+ client->mech = NULL;
+@@ -309,8 +309,10 @@ ssh_gssapi_getclient(Gssctxt *ctx, ssh_gssapi_client *client)
+
+ if ((ctx->major = ssh_gssapi_parse_ename(ctx,&ename,
+ &client->exportedname))) {
++ gss_release_buffer(&ctx->minor, &ename);
+ return (ctx->major);
+ }
++ gss_release_buffer(&ctx->minor, &ename);
+
+ /* We can't copy this structure, so we just move the pointer to it */
+ client->creds = ctx->client_creds;
diff --git a/krl.c b/krl.c
index 0e2b5f155..f2d105f23 100644
--- a/krl.c
diff --git a/0002-Add-SELinux-role-and-MLS-Multi-Level-Security-suppor.patch b/0002-Add-SELinux-role-and-MLS-Multi-Level-Security-suppor.patch
index 891681c..accdfb9 100644
--- a/0002-Add-SELinux-role-and-MLS-Multi-Level-Security-suppor.patch
+++ b/0002-Add-SELinux-role-and-MLS-Multi-Level-Security-suppor.patch
@@ -1,7 +1,7 @@
-From 2e901e0c17cf7907d374e45d8d998852f8165dd0 Mon Sep 17 00:00:00 2001
+From 65b48b2f97dae1ad0fa9ce3876d758571a479dc2 Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Mon, 13 Apr 2026 14:06:32 +0200
-Subject: [PATCH 02/53] Add SELinux role and MLS (Multi-Level Security) support
+Subject: [PATCH 02/55] Add SELinux role and MLS (Multi-Level Security) support
openssh-7.8p1-role-mls
diff --git a/0003-Implement-SELinux-environment-variable-setup-for-sub.patch b/0003-Implement-SELinux-environment-variable-setup-for-sub.patch
index 7ca3af4..4e9e2c7 100644
--- a/0003-Implement-SELinux-environment-variable-setup-for-sub.patch
+++ b/0003-Implement-SELinux-environment-variable-setup-for-sub.patch
@@ -1,7 +1,7 @@
-From a7151c0c1eb4dbb24a126142142adf9dfcc9b03f Mon Sep 17 00:00:00 2001
+From 8bb716a1c8bd12bfaf096423b52af3a629d8d35c Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Mon, 13 Apr 2026 14:06:47 +0200
-Subject: [PATCH 03/53] Implement SELinux environment variable setup for
+Subject: [PATCH 03/55] Implement SELinux environment variable setup for
subprocess execution
openssh-6.6p1-selinux-env-setup
diff --git a/0004-Pass-inetd-flags-and-auth-context-to-subprocess-call.patch b/0004-Pass-inetd-flags-and-auth-context-to-subprocess-call.patch
index ac46a5f..df5a7ed 100644
--- a/0004-Pass-inetd-flags-and-auth-context-to-subprocess-call.patch
+++ b/0004-Pass-inetd-flags-and-auth-context-to-subprocess-call.patch
@@ -1,7 +1,7 @@
-From ca95ea01edf9a7d855c959bf6a0b1b1fc3881a9b Mon Sep 17 00:00:00 2001
+From 8dab6562c751cb57f54dcb6c16e94c3d1eed3e9a Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Mon, 13 Apr 2026 14:07:02 +0200
-Subject: [PATCH 04/53] Pass inetd flags and auth context to subprocess calls
+Subject: [PATCH 04/55] Pass inetd flags and auth context to subprocess calls
for SELinux
openssh-7.6p1-subprocess-selinux
diff --git a/0005-openssh-6.6p1-keycat.patch b/0005-openssh-6.6p1-keycat.patch
index 0a880dd..cd37845 100644
--- a/0005-openssh-6.6p1-keycat.patch
+++ b/0005-openssh-6.6p1-keycat.patch
@@ -1,7 +1,7 @@
-From 40cb1cdd8561ba61047536c5adce51efcc5a1dd7 Mon Sep 17 00:00:00 2001
+From d1700309ef10836d51e78ac63ea5297651bd9517 Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:28 +0200
-Subject: [PATCH 05/53] openssh-6.6p1-keycat
+Subject: [PATCH 05/55] openssh-6.6p1-keycat
---
.depend | 1 +
diff --git a/0006-openssh-6.6p1-allow-ip-opts.patch b/0006-openssh-6.6p1-allow-ip-opts.patch
index d861254..fe413be 100644
--- a/0006-openssh-6.6p1-allow-ip-opts.patch
+++ b/0006-openssh-6.6p1-allow-ip-opts.patch
@@ -1,7 +1,7 @@
-From b2a9a77f3e51adbc6d7278766d17103ed7f6dc26 Mon Sep 17 00:00:00 2001
+From fb7bd5d7210c6fc7e9d170675887480a76bb4562 Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:28 +0200
-Subject: [PATCH 06/53] openssh-6.6p1-allow-ip-opts
+Subject: [PATCH 06/55] openssh-6.6p1-allow-ip-opts
#https://bugzilla.mindrot.org/show_bug.cgi?id=1644
---
diff --git a/0007-openssh-5.9p1-ipv6man.patch b/0007-openssh-5.9p1-ipv6man.patch
index 2b93e93..86f5535 100644
--- a/0007-openssh-5.9p1-ipv6man.patch
+++ b/0007-openssh-5.9p1-ipv6man.patch
@@ -1,7 +1,7 @@
-From 8d2df84e6caedbcc0dfdf4bf88c2cb606f3fcdab Mon Sep 17 00:00:00 2001
+From d074553cce4dc0b209afb9680b05e8022fca0918 Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:28 +0200
-Subject: [PATCH 07/53] openssh-5.9p1-ipv6man
+Subject: [PATCH 07/55] openssh-5.9p1-ipv6man
#(drop?) https://bugzilla.mindrot.org/show_bug.cgi?id=1925
---
diff --git a/0008-openssh-5.8p2-sigpipe.patch b/0008-openssh-5.8p2-sigpipe.patch
index 7d9b66c..3552e6b 100644
--- a/0008-openssh-5.8p2-sigpipe.patch
+++ b/0008-openssh-5.8p2-sigpipe.patch
@@ -1,7 +1,7 @@
-From 18b8d12cf0bd125bf46722826eea79790a4368d3 Mon Sep 17 00:00:00 2001
+From fd1c60b42c2058b9b96d99dce679b3725c23a6cf Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:28 +0200
-Subject: [PATCH 08/53] openssh-5.8p2-sigpipe
+Subject: [PATCH 08/55] openssh-5.8p2-sigpipe
---
ssh-keyscan.c | 3 +++
diff --git a/0009-openssh-5.1p1-askpass-progress.patch b/0009-openssh-5.1p1-askpass-progress.patch
index 93161d2..803df9b 100644
--- a/0009-openssh-5.1p1-askpass-progress.patch
+++ b/0009-openssh-5.1p1-askpass-progress.patch
@@ -1,7 +1,7 @@
-From 01144fb895bc9b58c56a1aaaa3460accfb071407 Mon Sep 17 00:00:00 2001
+From ee4dd6133c7b94a7d77d383c00ae3f7bb49e75e5 Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:28 +0200
-Subject: [PATCH 09/53] openssh-5.1p1-askpass-progress
+Subject: [PATCH 09/55] openssh-5.1p1-askpass-progress
---
contrib/gnome-ssh-askpass2.c | 39 +++++++++++++++++++++++++++++++++---
diff --git a/0010-openssh-4.3p2-askpass-grab-info.patch b/0010-openssh-4.3p2-askpass-grab-info.patch
index 9f5c712..7d33702 100644
--- a/0010-openssh-4.3p2-askpass-grab-info.patch
+++ b/0010-openssh-4.3p2-askpass-grab-info.patch
@@ -1,7 +1,7 @@
-From 1a50fefcfb6d01eff7a5f0074d964dda24887233 Mon Sep 17 00:00:00 2001
+From a7064575366c07449422440dc9912375928fba42 Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:28 +0200
-Subject: [PATCH 10/53] openssh-4.3p2-askpass-grab-info
+Subject: [PATCH 10/55] openssh-4.3p2-askpass-grab-info
#https://bugzilla.redhat.com/show_bug.cgi?id=198332
---
diff --git a/0011-openssh-8.7p1-redhat.patch b/0011-openssh-8.7p1-redhat.patch
index 491a151..edc528b 100644
--- a/0011-openssh-8.7p1-redhat.patch
+++ b/0011-openssh-8.7p1-redhat.patch
@@ -1,7 +1,7 @@
-From a857e54e79d458c45590e5f33890278efc44ee36 Mon Sep 17 00:00:00 2001
+From ff983db637c04f10acca7b150f1906cf064350b4 Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:28 +0200
-Subject: [PATCH 11/53] openssh-8.7p1-redhat
+Subject: [PATCH 11/55] openssh-8.7p1-redhat
#https://bugzilla.mindrot.org/show_bug.cgi?id=1635 (WONTFIX)
---
diff --git a/0012-openssh-7.8p1-UsePAM-warning.patch b/0012-openssh-7.8p1-UsePAM-warning.patch
index 7aff058..bb27ce7 100644
--- a/0012-openssh-7.8p1-UsePAM-warning.patch
+++ b/0012-openssh-7.8p1-UsePAM-warning.patch
@@ -1,7 +1,7 @@
-From 1290a977c0151b679cb5408271cba8401f74fe03 Mon Sep 17 00:00:00 2001
+From 8c21901074b439de6cd1fce2a330fd1cd7eb1150 Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:28 +0200
-Subject: [PATCH 12/53] openssh-7.8p1-UsePAM-warning
+Subject: [PATCH 12/55] openssh-7.8p1-UsePAM-warning
# warn users for unsupported UsePAM=no (#757545)
---
diff --git a/0013-openssh-9.6p1-gssapi-keyex.patch b/0013-openssh-9.6p1-gssapi-keyex.patch
index a075e62..f090577 100644
--- a/0013-openssh-9.6p1-gssapi-keyex.patch
+++ b/0013-openssh-9.6p1-gssapi-keyex.patch
@@ -1,7 +1,7 @@
-From 0f49823af059037a1358ef5b7e75daa4c803817a Mon Sep 17 00:00:00 2001
+From eb12899785513fae999f976fe73e72bc19baaf37 Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:28 +0200
-Subject: [PATCH 13/53] openssh-9.6p1-gssapi-keyex
+Subject: [PATCH 13/55] openssh-9.6p1-gssapi-keyex
---
.depend | 2 +
@@ -16,7 +16,7 @@ Subject: [PATCH 13/53] openssh-9.6p1-gssapi-keyex
configure.ac | 24 ++
gss-genr.c | 313 ++++++++++++++++++++-
gss-serv-krb5.c | 97 ++++++-
- gss-serv.c | 192 +++++++++++--
+ gss-serv.c | 199 ++++++++++++--
kex-names.c | 67 ++++-
kex.c | 35 ++-
kex.h | 34 +++
@@ -46,7 +46,7 @@ Subject: [PATCH 13/53] openssh-9.6p1-gssapi-keyex
sshd_config.5 | 43 ++-
sshkey.c | 72 ++++-
sshkey.h | 1 +
- 42 files changed, 2998 insertions(+), 81 deletions(-)
+ 42 files changed, 3005 insertions(+), 81 deletions(-)
create mode 100644 kexgssc.c
create mode 100644 kexgsss.c
@@ -976,7 +976,7 @@ index 4caac337c..be401fe0e 100644
#endif /* KRB5 */
diff --git a/gss-serv.c b/gss-serv.c
-index 16f653202..bf015aef7 100644
+index 92247cf51..a506051ec 100644
--- a/gss-serv.c
+++ b/gss-serv.c
@@ -1,7 +1,7 @@
@@ -1051,14 +1051,15 @@ index 16f653202..bf015aef7 100644
while (supported_mechs[i]->name != NULL) {
if (GSS_ERROR(gss_test_oid_set_member(&min_status,
-@@ -278,8 +305,48 @@ OM_uint32
+@@ -278,9 +305,56 @@ OM_uint32
ssh_gssapi_getclient(Gssctxt *ctx, ssh_gssapi_client *client)
{
int i = 0;
+-
+ int equal = 0;
+ gss_name_t new_name = GSS_C_NO_NAME;
-+ gss_buffer_desc ename = GSS_C_EMPTY_BUFFER;
-+
+ gss_buffer_desc ename = GSS_C_EMPTY_BUFFER;
+
+ if (options.gss_store_rekey && client->used && ctx->client_creds) {
+ if (client->mech->oid.length != ctx->oid->length ||
+ (memcmp(client->mech->oid.elements,
@@ -1067,6 +1068,11 @@ index 16f653202..bf015aef7 100644
+ return GSS_S_COMPLETE;
+ }
+
++ if (client->name == GSS_C_NO_NAME) {
++ debug("No previous client name to compare against");
++ return GSS_S_COMPLETE;
++ }
++
+ if ((ctx->major = gss_inquire_cred_by_mech(&ctx->minor,
+ ctx->client_creds, ctx->oid, &new_name,
+ NULL, NULL, NULL))) {
@@ -1076,15 +1082,16 @@ index 16f653202..bf015aef7 100644
+
+ ctx->major = gss_compare_name(&ctx->minor, client->name,
+ new_name, &equal);
-
-- gss_buffer_desc ename;
++
+ if (GSS_ERROR(ctx->major)) {
+ ssh_gssapi_error(ctx);
++ gss_release_name(&ctx->minor, &new_name);
+ return (ctx->major);
+ }
+
+ if (!equal) {
+ debug("Rekeyed credentials have different name");
++ gss_release_name(&ctx->minor, &new_name);
+ return GSS_S_COMPLETE;
+ }
+
@@ -1098,10 +1105,11 @@ index 16f653202..bf015aef7 100644
+ client->updated = 1;
+ return GSS_S_COMPLETE;
+ }
-
++
client->userok = 0;
client->mech = NULL;
-@@ -295,6 +362,13 @@ ssh_gssapi_getclient(Gssctxt *ctx, ssh_gssapi_client *client)
+
+@@ -295,6 +369,13 @@ ssh_gssapi_getclient(Gssctxt *ctx, ssh_gssapi_client *client)
if (client->mech == NULL)
return GSS_S_FAILURE;
@@ -1115,16 +1123,16 @@ index 16f653202..bf015aef7 100644
if ((ctx->major = gss_display_name(&ctx->minor, ctx->client,
&client->displayname, NULL))) {
ssh_gssapi_error(ctx);
-@@ -312,6 +386,8 @@ ssh_gssapi_getclient(Gssctxt *ctx, ssh_gssapi_client *client)
- return (ctx->major);
+@@ -314,6 +395,8 @@ ssh_gssapi_getclient(Gssctxt *ctx, ssh_gssapi_client *client)
}
+ gss_release_buffer(&ctx->minor, &ename);
+ gss_release_buffer(&ctx->minor, &ename);
+
/* We can't copy this structure, so we just move the pointer to it */
client->creds = ctx->client_creds;
ctx->client_creds = GSS_C_NO_CREDENTIAL;
-@@ -322,11 +398,20 @@ ssh_gssapi_getclient(Gssctxt *ctx, ssh_gssapi_client *client)
+@@ -324,11 +407,20 @@ ssh_gssapi_getclient(Gssctxt *ctx, ssh_gssapi_client *client)
void
ssh_gssapi_cleanup_creds(void)
{
@@ -1150,7 +1158,7 @@ index 16f653202..bf015aef7 100644
}
}
-@@ -380,7 +465,7 @@ ssh_gssapi_cleanup_global_client()
+@@ -382,7 +474,7 @@ ssh_gssapi_cleanup_global_client()
/* Privileged */
int
@@ -1159,7 +1167,7 @@ index 16f653202..bf015aef7 100644
{
if (gssapi_client.exportedname.length == 0 ||
gssapi_client.exportedname.value == NULL) {
-@@ -390,6 +475,8 @@ ssh_gssapi_userok(char *user)
+@@ -392,6 +484,8 @@ ssh_gssapi_userok(char *user)
if (gssapi_client.mech && gssapi_client.mech->userok)
if ((*gssapi_client.mech->userok)(&gssapi_client, user)) {
gssapi_client.userok = 1;
@@ -1168,7 +1176,7 @@ index 16f653202..bf015aef7 100644
return 1;
} else {
/* Destroy delegated credentials if userok fails */
-@@ -401,14 +488,85 @@ ssh_gssapi_userok(char *user)
+@@ -403,14 +497,85 @@ ssh_gssapi_userok(char *user)
return (0);
}
diff --git a/0014-openssh-6.6p1-force_krb.patch b/0014-openssh-6.6p1-force_krb.patch
index a578706..a3d27d2 100644
--- a/0014-openssh-6.6p1-force_krb.patch
+++ b/0014-openssh-6.6p1-force_krb.patch
@@ -1,7 +1,7 @@
-From 86e6acc12639c293fb98f1949348a1d6a7f77702 Mon Sep 17 00:00:00 2001
+From f52c07ac4f65dd7848441cfedb6f790788e97136 Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:28 +0200
-Subject: [PATCH 14/53] openssh-6.6p1-force_krb
+Subject: [PATCH 14/55] openssh-6.6p1-force_krb
#http://www.mail-archive.com/kerberos@mit.edu/msg17591.html
---
diff --git a/0015-openssh-7.7p1-gssapi-new-unique.patch b/0015-openssh-7.7p1-gssapi-new-unique.patch
index 91541c4..4493676 100644
--- a/0015-openssh-7.7p1-gssapi-new-unique.patch
+++ b/0015-openssh-7.7p1-gssapi-new-unique.patch
@@ -1,10 +1,10 @@
-From 573be6986398ac634329de8209377051d5d780a8 Mon Sep 17 00:00:00 2001
+From 2cf1ea43ed4a3a58c31ecdee8f783963ba5d70c2 Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:28 +0200
-Subject: [PATCH 15/53] openssh-7.7p1-gssapi-new-unique
+Subject: [PATCH 15/55] openssh-7.7p1-gssapi-new-unique
---
- auth-krb5.c | 264 ++++++++++++++++++++++++++++++++++++++++++------
+ auth-krb5.c | 278 ++++++++++++++++++++++++++++++++++++++++++------
auth.h | 3 +-
gss-serv-krb5.c | 42 +++-----
gss-serv.c | 14 +--
@@ -14,10 +14,10 @@ Subject: [PATCH 15/53] openssh-7.7p1-gssapi-new-unique
ssh-gss.h | 4 +-
sshd-session.c | 2 +-
sshd_config.5 | 8 ++
- 10 files changed, 277 insertions(+), 72 deletions(-)
+ 10 files changed, 291 insertions(+), 72 deletions(-)
diff --git a/auth-krb5.c b/auth-krb5.c
-index 3c6dc0622..863110910 100644
+index 3c6dc0622..5260a2032 100644
--- a/auth-krb5.c
+++ b/auth-krb5.c
@@ -51,6 +51,7 @@
@@ -48,13 +48,15 @@ index 3c6dc0622..863110910 100644
if (problem)
goto out;
-@@ -179,15 +180,14 @@ auth_krb5_password(Authctxt *authctxt, const char *password)
+@@ -179,15 +180,16 @@ auth_krb5_password(Authctxt *authctxt, const char *password)
goto out;
#endif
- authctxt->krb5_ticket_file = (char *)krb5_cc_get_name(authctxt->krb5_ctx, authctxt->krb5_fwd_ccache);
+ problem = krb5_cc_get_full_name(authctxt->krb5_ctx,
+ authctxt->krb5_fwd_ccache, &ticket_name);
++ if (problem)
++ goto out;
- len = strlen(authctxt->krb5_ticket_file) + 6;
- authctxt->krb5_ccname = xmalloc(len);
@@ -69,7 +71,7 @@ index 3c6dc0622..863110910 100644
do_pam_putenv("KRB5CCNAME", authctxt->krb5_ccname);
#endif
-@@ -223,11 +223,54 @@ auth_krb5_password(Authctxt *authctxt, const char *password)
+@@ -223,11 +225,54 @@ auth_krb5_password(Authctxt *authctxt, const char *password)
void
krb5_cleanup_proc(Authctxt *authctxt)
{
@@ -125,7 +127,7 @@ index 3c6dc0622..863110910 100644
if (authctxt->krb5_user) {
krb5_free_principal(authctxt->krb5_ctx, authctxt->krb5_user);
authctxt->krb5_user = NULL;
-@@ -238,36 +281,191 @@ krb5_cleanup_proc(Authctxt *authctxt)
+@@ -238,36 +283,203 @@ krb5_cleanup_proc(Authctxt *authctxt)
}
}
@@ -207,8 +209,11 @@ index 3c6dc0622..863110910 100644
+ goto cleanup;
+ continue;
+ } else {
-+ p_o = strchr(p_n, '}') + 1;
-+ *p_o = '\0';
++ if ((p_o = strchr(p_n, '}')) == NULL) {
++ debug_f("unterminated token in %s", template);
++ goto cleanup;
++ }
++ *++p_o = '\0';
+ debug_f("unsupported token %s in %s", p_n, template);
+ /* unknown token, fallback to the default */
+ goto cleanup;
@@ -241,13 +246,17 @@ index 3c6dc0622..863110910 100644
+ return ret;
+
+ ret = profile_get_string(p, "libdefaults", "default_ccache_name", NULL, NULL, &value);
++ profile_release(p);
+ if (ret || !value)
+ return ret;
+
+ ret = ssh_krb5_expand_template(ccname, value);
++ profile_release_string(value);
++ if (ret)
++ return ret;
+
+ debug3_f("returning with ccname = %s", *ccname);
-+ return ret;
++ return 0;
+}
+
+krb5_error_code
@@ -263,8 +272,7 @@ index 3c6dc0622..863110910 100644
+ ret = ssh_krb5_get_cctemplate(ctx, &ccname);
+ if (ret || !ccname || options.kerberos_unique_ccache) {
+ /* Otherwise, go with the old method */
-+ if (ccname)
-+ free(ccname);
++ free(ccname);
+ ccname = NULL;
+
+ ret = asprintf(&ccname,
@@ -303,17 +311,20 @@ index 3c6dc0622..863110910 100644
+ /* set the default with already expanded user IDs */
+ ret = krb5_cc_set_default_name(ctx, ccname);
+ if (ret)
-+ return ret;
++ goto out;
+
+ if ((colon = strstr(ccname, ":")) != NULL) {
+ type_len = colon - ccname;
+ type = malloc((type_len + 1) * sizeof(char));
-+ if (type == NULL)
-+ return ENOMEM;
++ if (type == NULL) {
++ ret = ENOMEM;
++ goto out;
++ }
+ strncpy(type, ccname, type_len);
+ type[type_len] = 0;
-+ } else {
-+ type = strdup(ccname);
++ } else if ((type = strdup(ccname)) == NULL) {
++ ret = ENOMEM;
++ goto out;
+ }
+
+ /* If we have a credential cache from krb5.conf, we need to switch
@@ -322,21 +333,24 @@ index 3c6dc0622..863110910 100644
+ if (krb5_cc_support_switch(ctx, type)) {
+ debug3_f("calling cc_new_unique(%s)", ccname);
+ ret = krb5_cc_new_unique(ctx, type, NULL, ccache);
-+ free(type);
+ if (ret)
-+ return ret;
++ goto out;
+
+ debug3_f("calling cc_switch()");
-+ return krb5_cc_switch(ctx, *ccache);
++ ret = krb5_cc_switch(ctx, *ccache);
+ } else {
+ /* Otherwise, we can not create a unique ccname here (either
+ * it is already unique from above or the type does not support
+ * collections
+ */
-+ free(type);
+ debug3_f("calling cc_resolve(%s)", ccname);
-+ return (krb5_cc_resolve(ctx, ccname, ccache));
++ ret = krb5_cc_resolve(ctx, ccname, ccache);
+ }
++
++out:
++ free(type);
++ free(ccname);
++ return ret;
}
#endif /* !HEIMDAL */
#endif /* KRB5 */
@@ -477,10 +491,10 @@ index c26174928..415fb1893 100644
int
diff --git a/gss-serv.c b/gss-serv.c
-index bf015aef7..5bc31289e 100644
+index a506051ec..d8e1c626a 100644
--- a/gss-serv.c
+++ b/gss-serv.c
-@@ -416,23 +416,25 @@ ssh_gssapi_cleanup_creds(void)
+@@ -425,23 +425,25 @@ ssh_gssapi_cleanup_creds(void)
}
/* As user */
@@ -510,7 +524,7 @@ index bf015aef7..5bc31289e 100644
}
/* This allows GSSAPI methods to do things to the child's environment based
-@@ -516,9 +518,7 @@ ssh_gssapi_rekey_creds(void) {
+@@ -525,9 +527,7 @@ ssh_gssapi_rekey_creds(void) {
char *envstr;
#endif
diff --git a/0016-openssh-7.2p2-k5login_directory.patch b/0016-openssh-7.2p2-k5login_directory.patch
index 0bd48cd..0f6ee8b 100644
--- a/0016-openssh-7.2p2-k5login_directory.patch
+++ b/0016-openssh-7.2p2-k5login_directory.patch
@@ -1,23 +1,23 @@
-From 5073b970e45212e70e89106e4d3538ee58d2bcd4 Mon Sep 17 00:00:00 2001
+From fb1f3c942f72db3f76ac8505cf52ce25b255a39a Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:28 +0200
-Subject: [PATCH 16/53] openssh-7.2p2-k5login_directory
+Subject: [PATCH 16/55] openssh-7.2p2-k5login_directory
# Respect k5login_directory option in krk5.conf (#1328243)
---
- auth-krb5.c | 16 ++++++++++++++++
+ auth-krb5.c | 29 +++++++++++++++++++++++++++++
auth.h | 2 ++
- gss-serv-krb5.c | 21 ++++++++++++++++++++-
+ gss-serv-krb5.c | 22 +++++++++++++++++++++-
sshd.8 | 4 ++++
- 4 files changed, 42 insertions(+), 1 deletion(-)
+ 4 files changed, 56 insertions(+), 1 deletion(-)
diff --git a/auth-krb5.c b/auth-krb5.c
-index 863110910..996b19738 100644
+index 5260a2032..cd6471b6e 100644
--- a/auth-krb5.c
+++ b/auth-krb5.c
-@@ -467,5 +467,21 @@ ssh_krb5_cc_new_unique(krb5_context ctx, krb5_ccache *ccache, int *need_environm
- return (krb5_cc_resolve(ctx, ccname, ccache));
- }
+@@ -481,5 +481,34 @@ out:
+ free(ccname);
+ return ret;
}
+
+/*
@@ -26,14 +26,27 @@ index 863110910..996b19738 100644
+krb5_error_code
+ssh_krb5_get_k5login_directory(krb5_context ctx, char **k5login_directory) {
+ profile_t p;
++ char *value = NULL;
+ int ret = 0;
+
+ ret = krb5_get_profile(ctx, &p);
+ if (ret)
+ return ret;
+
-+ return profile_get_string(p, "libdefaults", "k5login_directory", NULL, NULL,
-+ k5login_directory);
++ ret = profile_get_string(p, "libdefaults", "k5login_directory", NULL,
++ NULL, &value);
++ profile_release(p);
++ if (ret)
++ return ret;
++
++ /*
++ * Hand back a copy allocated by the usual allocator so that the
++ * caller can free() it without needing the profile API.
++ */
++ *k5login_directory = value == NULL ? NULL : xstrdup(value);
++ profile_release_string(value);
++
++ return 0;
+}
#endif /* !HEIMDAL */
#endif /* KRB5 */
@@ -51,10 +64,10 @@ index e1ce9d7c0..2e0051899 100644
#endif /* AUTH_H */
diff --git a/gss-serv-krb5.c b/gss-serv-krb5.c
-index 415fb1893..7df31c6af 100644
+index 415fb1893..fb945b2d5 100644
--- a/gss-serv-krb5.c
+++ b/gss-serv-krb5.c
-@@ -144,8 +144,27 @@ ssh_gssapi_k5login_exists()
+@@ -144,8 +144,28 @@ ssh_gssapi_k5login_exists()
{
char file[MAXPATHLEN];
struct passwd *pw = the_authctxt->pw;
@@ -78,6 +91,7 @@ index 415fb1893..7df31c6af 100644
+ pw->pw_name);
+ }
+ debug_f("Checking existence of file %s", file);
++ free(k5login_directory);
- snprintf(file, sizeof(file), "%s/.k5login", pw->pw_dir);
return access(file, F_OK) == 0;
diff --git a/0017-openssh-6.6p1-kuserok.patch b/0017-openssh-6.6p1-kuserok.patch
index f55884a..2e60f54 100644
--- a/0017-openssh-6.6p1-kuserok.patch
+++ b/0017-openssh-6.6p1-kuserok.patch
@@ -1,7 +1,7 @@
-From 30a14b0785de651321467eb2c7307c8833c1cd66 Mon Sep 17 00:00:00 2001
+From 2d8aa9324dd286bbd28d456e202d1e78eeacc82b Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:28 +0200
-Subject: [PATCH 17/53] openssh-6.6p1-kuserok
+Subject: [PATCH 17/55] openssh-6.6p1-kuserok
---
auth-krb5.c | 20 ++++++++-
@@ -13,7 +13,7 @@ Subject: [PATCH 17/53] openssh-6.6p1-kuserok
6 files changed, 133 insertions(+), 6 deletions(-)
diff --git a/auth-krb5.c b/auth-krb5.c
-index 996b19738..2e3c1c80f 100644
+index cd6471b6e..d0784ddeb 100644
--- a/auth-krb5.c
+++ b/auth-krb5.c
@@ -55,6 +55,21 @@
@@ -51,7 +51,7 @@ index 996b19738..2e3c1c80f 100644
goto out;
}
diff --git a/gss-serv-krb5.c b/gss-serv-krb5.c
-index 7df31c6af..6f5826ce8 100644
+index fb945b2d5..8c77677db 100644
--- a/gss-serv-krb5.c
+++ b/gss-serv-krb5.c
@@ -66,6 +66,7 @@ static int ssh_gssapi_krb5_cmdok(krb5_principal, const char *, const char *,
@@ -176,7 +176,7 @@ index 7df31c6af..6f5826ce8 100644
retval = 1;
logit("Authorized to %s, krb5 principal %s (krb5_kuserok)",
name, (char *)client->displayname.value);
-@@ -190,9 +289,8 @@ ssh_gssapi_krb5_cmdok(krb5_principal principal, const char *name,
+@@ -191,9 +290,8 @@ ssh_gssapi_krb5_cmdok(krb5_principal principal, const char *name,
snprintf(file, sizeof(file), "%s/.k5users", pw->pw_dir);
/* If both .k5login and .k5users DNE, self-login is ok. */
if (!k5login_exists && (access(file, F_OK) == -1)) {
diff --git a/0018-openssh-6.4p1-fromto-remote.patch b/0018-openssh-6.4p1-fromto-remote.patch
index a3f2629..08bb582 100644
--- a/0018-openssh-6.4p1-fromto-remote.patch
+++ b/0018-openssh-6.4p1-fromto-remote.patch
@@ -1,7 +1,7 @@
-From 3eba13cb9f6e5f2d099bd9b98d393f247b2b640c Mon Sep 17 00:00:00 2001
+From 17918b3c3aac196f0a9ed639f0b6ff1464b2f4d9 Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:28 +0200
-Subject: [PATCH 18/53] openssh-6.4p1-fromto-remote
+Subject: [PATCH 18/55] openssh-6.4p1-fromto-remote
# Use tty allocation for a remote scp (#985650)
---
diff --git a/0019-openssh-6.6.1p1-log-in-chroot.patch b/0019-openssh-6.6.1p1-log-in-chroot.patch
index 37f33dd..13b2fc0 100644
--- a/0019-openssh-6.6.1p1-log-in-chroot.patch
+++ b/0019-openssh-6.6.1p1-log-in-chroot.patch
@@ -1,7 +1,7 @@
-From 100c5fe6e0a7e838b8c4793279dc18aa6d19074c Mon Sep 17 00:00:00 2001
+From 4350e4397b371e17a8f3afd4c9fdfbf26dbde6ea Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:28 +0200
-Subject: [PATCH 19/53] openssh-6.6.1p1-log-in-chroot
+Subject: [PATCH 19/55] openssh-6.6.1p1-log-in-chroot
---
log.c | 11 +++++++++--
diff --git a/0020-openssh-6.6.1p1-scp-non-existing-directory.patch b/0020-openssh-6.6.1p1-scp-non-existing-directory.patch
index 54e9ddd..02cda97 100644
--- a/0020-openssh-6.6.1p1-scp-non-existing-directory.patch
+++ b/0020-openssh-6.6.1p1-scp-non-existing-directory.patch
@@ -1,7 +1,7 @@
-From 26e77ff2e0a12b290bf92a2bbbd94998155bdae8 Mon Sep 17 00:00:00 2001
+From 59f32c83d32a8f736734cb99aa8955646fc00959 Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:28 +0200
-Subject: [PATCH 20/53] openssh-6.6.1p1-scp-non-existing-directory
+Subject: [PATCH 20/55] openssh-6.6.1p1-scp-non-existing-directory
# scp file into non-existing directory (#1142223)
---
diff --git a/0021-openssh-6.6p1-GSSAPIEnablek5users.patch b/0021-openssh-6.6p1-GSSAPIEnablek5users.patch
index 53e429a..fca4b99 100644
--- a/0021-openssh-6.6p1-GSSAPIEnablek5users.patch
+++ b/0021-openssh-6.6p1-GSSAPIEnablek5users.patch
@@ -1,7 +1,7 @@
-From d112cb6d64b91e564dd965fdbd8fdb6b7404bdbc Mon Sep 17 00:00:00 2001
+From 741af8e7b67037d60873ed475f2253ad0193cd30 Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:28 +0200
-Subject: [PATCH 21/53] openssh-6.6p1-GSSAPIEnablek5users
+Subject: [PATCH 21/55] openssh-6.6p1-GSSAPIEnablek5users
---
gss-serv-krb5.c | 3 +--
@@ -11,10 +11,10 @@ Subject: [PATCH 21/53] openssh-6.6p1-GSSAPIEnablek5users
4 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/gss-serv-krb5.c b/gss-serv-krb5.c
-index 6f5826ce8..723509409 100644
+index 8c77677db..34a108bdb 100644
--- a/gss-serv-krb5.c
+++ b/gss-serv-krb5.c
-@@ -278,7 +278,6 @@ ssh_gssapi_krb5_cmdok(krb5_principal principal, const char *name,
+@@ -279,7 +279,6 @@ ssh_gssapi_krb5_cmdok(krb5_principal principal, const char *name,
FILE *fp;
char file[MAXPATHLEN];
char *line = NULL;
@@ -22,7 +22,7 @@ index 6f5826ce8..723509409 100644
struct stat st;
struct passwd *pw = the_authctxt->pw;
int found_principal = 0;
-@@ -288,7 +287,7 @@ ssh_gssapi_krb5_cmdok(krb5_principal principal, const char *name,
+@@ -289,7 +288,7 @@ ssh_gssapi_krb5_cmdok(krb5_principal principal, const char *name,
snprintf(file, sizeof(file), "%s/.k5users", pw->pw_dir);
/* If both .k5login and .k5users DNE, self-login is ok. */
diff --git a/0022-openssh-6.8p1-sshdT-output.patch b/0022-openssh-6.8p1-sshdT-output.patch
index 27777a7..6514aac 100644
--- a/0022-openssh-6.8p1-sshdT-output.patch
+++ b/0022-openssh-6.8p1-sshdT-output.patch
@@ -1,7 +1,7 @@
-From 8d26ab37e23e7a2aa93d9068140060e620ba77eb Mon Sep 17 00:00:00 2001
+From 9d86b0f617da162bd43d3ce7b4955db6ce9fffdf Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:28 +0200
-Subject: [PATCH 22/53] openssh-6.8p1-sshdT-output
+Subject: [PATCH 22/55] openssh-6.8p1-sshdT-output
# apply upstream patch and make sshd -T more consistent (#1187521)
---
diff --git a/0023-openssh-6.7p1-sftp-force-permission.patch b/0023-openssh-6.7p1-sftp-force-permission.patch
index 7de4a26..2964549 100644
--- a/0023-openssh-6.7p1-sftp-force-permission.patch
+++ b/0023-openssh-6.7p1-sftp-force-permission.patch
@@ -1,7 +1,7 @@
-From ddf3bce18db9921dd13c3a871c14e4273e0af06e Mon Sep 17 00:00:00 2001
+From 0b5207f1035580b1fe9fb10b794d54e41d47adde Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:28 +0200
-Subject: [PATCH 23/53] openssh-6.7p1-sftp-force-permission
+Subject: [PATCH 23/55] openssh-6.7p1-sftp-force-permission
# Add sftp option to force mode of created files (#1191055)
---
diff --git a/0024-openssh-7.2p2-s390-closefrom.patch b/0024-openssh-7.2p2-s390-closefrom.patch
index f8f6f5c..33c7b47 100644
--- a/0024-openssh-7.2p2-s390-closefrom.patch
+++ b/0024-openssh-7.2p2-s390-closefrom.patch
@@ -1,7 +1,7 @@
-From 157671a6eeef976de0f2bf7777c810ff0000aa8c Mon Sep 17 00:00:00 2001
+From 9760d7bd1001d53bc1c6b136a487e3441f88a062 Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:28 +0200
-Subject: [PATCH 24/53] openssh-7.2p2-s390-closefrom
+Subject: [PATCH 24/55] openssh-7.2p2-s390-closefrom
# make s390 use /dev/ crypto devices -- ignore closefrom
---
diff --git a/0025-openssh-7.5p1-sandbox.patch b/0025-openssh-7.5p1-sandbox.patch
index 56e9a64..3851f38 100644
--- a/0025-openssh-7.5p1-sandbox.patch
+++ b/0025-openssh-7.5p1-sandbox.patch
@@ -1,7 +1,7 @@
-From 06d3d3ec2a20c238018b3513ee8c3804333391f9 Mon Sep 17 00:00:00 2001
+From bbb00e499601f62ef2d0d22e2ebe752b50d1eed9 Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:28 +0200
-Subject: [PATCH 25/53] openssh-7.5p1-sandbox
+Subject: [PATCH 25/55] openssh-7.5p1-sandbox
# Sandbox adjustments for s390 and audit
---
diff --git a/0026-openssh-7.8p1-scp-ipv6.patch b/0026-openssh-7.8p1-scp-ipv6.patch
index 5f0131a..12db283 100644
--- a/0026-openssh-7.8p1-scp-ipv6.patch
+++ b/0026-openssh-7.8p1-scp-ipv6.patch
@@ -1,7 +1,7 @@
-From dcd4c76ef216e4493d4a469304afe71bd8ed7f43 Mon Sep 17 00:00:00 2001
+From ec0208c11f27f146c25381aae1f8aae2d9c0dc1b Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:28 +0200
-Subject: [PATCH 26/53] openssh-7.8p1-scp-ipv6
+Subject: [PATCH 26/55] openssh-7.8p1-scp-ipv6
# Unbreak scp between two IPv6 hosts (#1620333)
---
diff --git a/0027-openssh-8.0p1-crypto-policies.patch b/0027-openssh-8.0p1-crypto-policies.patch
index fda4682..405bd0b 100644
--- a/0027-openssh-8.0p1-crypto-policies.patch
+++ b/0027-openssh-8.0p1-crypto-policies.patch
@@ -1,7 +1,7 @@
-From 928a38995ab234e713313e81afaa3e2b2d004c19 Mon Sep 17 00:00:00 2001
+From 89edfa0d72b61be566dab5fc4fee947c299006cc Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:28 +0200
-Subject: [PATCH 27/53] openssh-8.0p1-crypto-policies
+Subject: [PATCH 27/55] openssh-8.0p1-crypto-policies
---
ssh_config.5 | 168 ++++++++++++++++++--------------------------
diff --git a/0028-openssh-8.0p1-openssl-kdf.patch b/0028-openssh-8.0p1-openssl-kdf.patch
index ea5465d..90b166e 100644
--- a/0028-openssh-8.0p1-openssl-kdf.patch
+++ b/0028-openssh-8.0p1-openssl-kdf.patch
@@ -1,7 +1,7 @@
-From 5d7aa68af8286b80870e143429d21f224345ae1f Mon Sep 17 00:00:00 2001
+From 9db694db202ecd6417388810c341351dc6504d0e Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:28 +0200
-Subject: [PATCH 28/53] openssh-8.0p1-openssl-kdf
+Subject: [PATCH 28/55] openssh-8.0p1-openssl-kdf
# Use OpenSSL KDF (#1631761)
---
diff --git a/0029-openssh-8.2p1-visibility.patch b/0029-openssh-8.2p1-visibility.patch
index 6eceae6..d9909db 100644
--- a/0029-openssh-8.2p1-visibility.patch
+++ b/0029-openssh-8.2p1-visibility.patch
@@ -1,7 +1,7 @@
-From d498de77e75f0c5810dff5d613ad947e6d4548ba Mon Sep 17 00:00:00 2001
+From 15ed4ca8b2643d0fd11740390322d0ac5249a805 Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:28 +0200
-Subject: [PATCH 29/53] openssh-8.2p1-visibility
+Subject: [PATCH 29/55] openssh-8.2p1-visibility
# sk-dummy.so built with -fvisibility=hidden does not work
---
diff --git a/0030-openssh-8.2p1-x11-without-ipv6.patch b/0030-openssh-8.2p1-x11-without-ipv6.patch
index d1933dc..6bb7448 100644
--- a/0030-openssh-8.2p1-x11-without-ipv6.patch
+++ b/0030-openssh-8.2p1-x11-without-ipv6.patch
@@ -1,7 +1,7 @@
-From e83d40875ee3ea7927d564b067a0f77deae4c448 Mon Sep 17 00:00:00 2001
+From 6ee928df2c636e91e66584a96a4d5711e13938e2 Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:28 +0200
-Subject: [PATCH 30/53] openssh-8.2p1-x11-without-ipv6
+Subject: [PATCH 30/55] openssh-8.2p1-x11-without-ipv6
# Do not break X11 without IPv6
---
diff --git a/0031-openssh-8.0p1-preserve-pam-errors.patch b/0031-openssh-8.0p1-preserve-pam-errors.patch
index 487e9ec..e16820d 100644
--- a/0031-openssh-8.0p1-preserve-pam-errors.patch
+++ b/0031-openssh-8.0p1-preserve-pam-errors.patch
@@ -1,7 +1,7 @@
-From 2154bd20aaa35ec4c2dd98acc173007c09bb119e Mon Sep 17 00:00:00 2001
+From e859c8699b8259117f8e7e84a9ba5cf66bf393de Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:29 +0200
-Subject: [PATCH 31/53] openssh-8.0p1-preserve-pam-errors
+Subject: [PATCH 31/55] openssh-8.0p1-preserve-pam-errors
# sshd provides PAM an incorrect error code (#1879503)
---
diff --git a/0032-openssh-8.7p1-scp-kill-switch.patch b/0032-openssh-8.7p1-scp-kill-switch.patch
index fb5fd37..6293d82 100644
--- a/0032-openssh-8.7p1-scp-kill-switch.patch
+++ b/0032-openssh-8.7p1-scp-kill-switch.patch
@@ -1,7 +1,7 @@
-From fefcd308985886865df45b55af79059951af04a0 Mon Sep 17 00:00:00 2001
+From f1ded522b597685171d03efaeee4c7b5caefafaa Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:29 +0200
-Subject: [PATCH 32/53] openssh-8.7p1-scp-kill-switch
+Subject: [PATCH 32/55] openssh-8.7p1-scp-kill-switch
# Implement kill switch for SCP protocol
---
diff --git a/0033-openssh-8.7p1-recursive-scp.patch b/0033-openssh-8.7p1-recursive-scp.patch
index 68ce8f1..11df67a 100644
--- a/0033-openssh-8.7p1-recursive-scp.patch
+++ b/0033-openssh-8.7p1-recursive-scp.patch
@@ -1,7 +1,7 @@
-From ef9865206c8da65194adf7cd45dd820f6020bd5a Mon Sep 17 00:00:00 2001
+From 35b6a699b74a7203c556b80bc95cc3ed1ad7c986 Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:29 +0200
-Subject: [PATCH 33/53] openssh-8.7p1-recursive-scp
+Subject: [PATCH 33/55] openssh-8.7p1-recursive-scp
# Workaround for lack of sftp_realpath in older versions of RHEL
# https://bugzilla.redhat.com/show_bug.cgi?id=2038854
diff --git a/0034-openssh-8.7p1-ibmca.patch b/0034-openssh-8.7p1-ibmca.patch
index efd073e..493cdf2 100644
--- a/0034-openssh-8.7p1-ibmca.patch
+++ b/0034-openssh-8.7p1-ibmca.patch
@@ -1,7 +1,7 @@
-From ba3fc4ba26aee5474f0a82dea44eb99a203c373b Mon Sep 17 00:00:00 2001
+From ac335530672e890a9f496fbff7f656328e12cc71 Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:29 +0200
-Subject: [PATCH 34/53] openssh-8.7p1-ibmca
+Subject: [PATCH 34/55] openssh-8.7p1-ibmca
# downstream only, IBMCA tentative fix
# From https://bugzilla.redhat.com/show_bug.cgi?id=1976202#c14
diff --git a/0035-openssh-7.6p1-audit.patch b/0035-openssh-7.6p1-audit.patch
index 6ab961e..9533061 100644
--- a/0035-openssh-7.6p1-audit.patch
+++ b/0035-openssh-7.6p1-audit.patch
@@ -1,7 +1,7 @@
-From 3b6c45fa20e35c08c740421ff8b2393569f13e81 Mon Sep 17 00:00:00 2001
+From 1590861f20ec8435a42560412e59e771f245b3b5 Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:29 +0200
-Subject: [PATCH 35/53] openssh-7.6p1-audit
+Subject: [PATCH 35/55] openssh-7.6p1-audit
---
Makefile.in | 2 +-
diff --git a/0036-openssh-7.1p2-audit-race-condition.patch b/0036-openssh-7.1p2-audit-race-condition.patch
index 9d7be87..5475e4d 100644
--- a/0036-openssh-7.1p2-audit-race-condition.patch
+++ b/0036-openssh-7.1p2-audit-race-condition.patch
@@ -1,7 +1,7 @@
-From 069e1c8c675b7159653ef33a5897805130fa7d40 Mon Sep 17 00:00:00 2001
+From 7bdad947e927f233976304ab5f59eb238455b0a8 Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:29 +0200
-Subject: [PATCH 36/53] openssh-7.1p2-audit-race-condition
+Subject: [PATCH 36/55] openssh-7.1p2-audit-race-condition
# Audit race condition in forked child (#1310684)
---
diff --git a/0037-openssh-9.0p1-audit-log.patch b/0037-openssh-9.0p1-audit-log.patch
index e7921e4..235ccc2 100644
--- a/0037-openssh-9.0p1-audit-log.patch
+++ b/0037-openssh-9.0p1-audit-log.patch
@@ -1,7 +1,7 @@
-From c6fc191a070b13dbfec2eaedadf5fd32931d9b08 Mon Sep 17 00:00:00 2001
+From ce18975e755c34d6e3a4272b39e928119ad8342b Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:29 +0200
-Subject: [PATCH 37/53] openssh-9.0p1-audit-log
+Subject: [PATCH 37/55] openssh-9.0p1-audit-log
# https://bugzilla.redhat.com/show_bug.cgi?id=2049947
---
diff --git a/0038-openssh-7.7p1-fips.patch b/0038-openssh-7.7p1-fips.patch
index 1dfc3a3..c3807f2 100644
--- a/0038-openssh-7.7p1-fips.patch
+++ b/0038-openssh-7.7p1-fips.patch
@@ -1,7 +1,7 @@
-From 9417cd7d036883549aeab30e12f3eaa924421b1f Mon Sep 17 00:00:00 2001
+From 337c297297bda18a67505dace8ffa0bd47fb9207 Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 28 Aug 2025 14:01:38 +0200
-Subject: [PATCH 38/53] openssh-7.7p1-fips
+Subject: [PATCH 38/55] openssh-7.7p1-fips
---
dh.c | 41 ++++++++++++++++++++++
diff --git a/0039-openssh-8.7p1-negotiate-supported-algs.patch b/0039-openssh-8.7p1-negotiate-supported-algs.patch
index f1bd4f1..ec52409 100644
--- a/0039-openssh-8.7p1-negotiate-supported-algs.patch
+++ b/0039-openssh-8.7p1-negotiate-supported-algs.patch
@@ -1,7 +1,7 @@
-From 6f1d20630d0b07ff213fa91b55748fd6cf4f0856 Mon Sep 17 00:00:00 2001
+From 14b8f6a30a642c8e5dac11decd7923ae5ae8eaa2 Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:29 +0200
-Subject: [PATCH 39/53] openssh-8.7p1-negotiate-supported-algs
+Subject: [PATCH 39/55] openssh-8.7p1-negotiate-supported-algs
# Don't propose disallowed algorithms during hostkey negotiation
# upstream MR:
diff --git a/0040-openssh-9.0p1-evp-fips-kex.patch b/0040-openssh-9.0p1-evp-fips-kex.patch
index 668a0ac..334f01f 100644
--- a/0040-openssh-9.0p1-evp-fips-kex.patch
+++ b/0040-openssh-9.0p1-evp-fips-kex.patch
@@ -1,7 +1,7 @@
-From 224219820fa66356917a648fdf90e660dd041304 Mon Sep 17 00:00:00 2001
+From 3e542a3446b5d8c7b916e8823ea0898baeb201c6 Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:29 +0200
-Subject: [PATCH 40/53] openssh-9.0p1-evp-fips-kex
+Subject: [PATCH 40/55] openssh-9.0p1-evp-fips-kex
---
dh.c | 98 +++++++++++++++++++++++++++++++++-----
diff --git a/0041-openssh-8.7p1-nohostsha1proof.patch b/0041-openssh-8.7p1-nohostsha1proof.patch
index a45d90c..5f27518 100644
--- a/0041-openssh-8.7p1-nohostsha1proof.patch
+++ b/0041-openssh-8.7p1-nohostsha1proof.patch
@@ -1,7 +1,7 @@
-From df77d50fd29fa47b14681341232b24e1b42daee9 Mon Sep 17 00:00:00 2001
+From b45a2981ecbd16a69023ee927432ba8b15defc5d Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:29 +0200
-Subject: [PATCH 41/53] openssh-8.7p1-nohostsha1proof
+Subject: [PATCH 41/55] openssh-8.7p1-nohostsha1proof
---
compat.c | 6 +++++
diff --git a/0042-openssh-9.9p1-separate-keysign.patch b/0042-openssh-9.9p1-separate-keysign.patch
index f8731da..eac0a35 100644
--- a/0042-openssh-9.9p1-separate-keysign.patch
+++ b/0042-openssh-9.9p1-separate-keysign.patch
@@ -1,7 +1,7 @@
-From 8f5a3dbf908afab34dc3e4f0fb94e783b810b5b2 Mon Sep 17 00:00:00 2001
+From 3301be277ed17ad2d68e464a8a0d5bcb881248ed Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:29 +0200
-Subject: [PATCH 42/53] openssh-9.9p1-separate-keysign
+Subject: [PATCH 42/55] openssh-9.9p1-separate-keysign
---
ssh_config.5 | 2 +-
diff --git a/0043-openssh-9.9p1-openssl-mlkem.patch b/0043-openssh-9.9p1-openssl-mlkem.patch
index 4895c33..ef51fb2 100644
--- a/0043-openssh-9.9p1-openssl-mlkem.patch
+++ b/0043-openssh-9.9p1-openssl-mlkem.patch
@@ -1,7 +1,7 @@
-From fc3fc20d8fe4ecb76d625bc5e52c775fbc63fb56 Mon Sep 17 00:00:00 2001
+From 6bb160bfd38e92cc5321860748729fb4c9397011 Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:29 +0200
-Subject: [PATCH 43/53] openssh-9.9p1-openssl-mlkem
+Subject: [PATCH 43/55] openssh-9.9p1-openssl-mlkem
---
kex-names.c | 23 +++-
diff --git a/0044-openssh-9.9p2-error_processing.patch b/0044-openssh-9.9p2-error_processing.patch
index 2f7df99..b7f6e1e 100644
--- a/0044-openssh-9.9p2-error_processing.patch
+++ b/0044-openssh-9.9p2-error_processing.patch
@@ -1,7 +1,7 @@
-From 50aac8bc7ee285b84b4b4b5ca09177ebcb421b65 Mon Sep 17 00:00:00 2001
+From d47416b3b34113f09d14da6fd5fc9826733afb67 Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Fri, 16 May 2025 14:53:54 +0200
-Subject: [PATCH 44/53] openssh-9.9p2-error_processing
+Subject: [PATCH 44/55] openssh-9.9p2-error_processing
# https://www.openwall.com/lists/oss-security/2025/02/22/1
---
diff --git a/0045-Ignore-bad-hostkeys-in-known_hosts-file.patch b/0045-Ignore-bad-hostkeys-in-known_hosts-file.patch
index a8acb68..2596825 100644
--- a/0045-Ignore-bad-hostkeys-in-known_hosts-file.patch
+++ b/0045-Ignore-bad-hostkeys-in-known_hosts-file.patch
@@ -1,7 +1,7 @@
-From 0cc83d529914b43353f9fb6d6cb14d12c3f1cfa8 Mon Sep 17 00:00:00 2001
+From 08f8b69b36ad6ee154e690e71c026b00181fbbef Mon Sep 17 00:00:00 2001
From: Zoltan Fridrich <zfridric@redhat.com>
Date: Mon, 5 May 2025 11:52:25 +0200
-Subject: [PATCH 45/53] Ignore bad hostkeys in known_hosts file
+Subject: [PATCH 45/55] Ignore bad hostkeys in known_hosts file
Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
diff --git a/0046-support-authentication-indicators-in-GSSAPI.patch b/0046-support-authentication-indicators-in-GSSAPI.patch
index 7493b1d..56377be 100644
--- a/0046-support-authentication-indicators-in-GSSAPI.patch
+++ b/0046-support-authentication-indicators-in-GSSAPI.patch
@@ -1,7 +1,7 @@
-From 12f718a27b18fee507b28959c942f8fe3f84efa3 Mon Sep 17 00:00:00 2001
+From f05806568778c7cb6368adee641a8e4ad013a865 Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Sun, 12 Apr 2026 12:23:51 +0200
-Subject: [PATCH 46/53] support authentication indicators in GSSAPI
+Subject: [PATCH 46/55] support authentication indicators in GSSAPI
https://github.com/openssh/openssh-portable/pull/500
@@ -29,7 +29,7 @@ index 831b611bd..e850041fb 100644
AC_SEARCH_LIBS([k_hasafs], [kafs], [AC_DEFINE([USE_AFS], [1],
[Define this if you want to use libkafs' AFS support])])
diff --git a/gss-serv-krb5.c b/gss-serv-krb5.c
-index 723509409..fc7cabc09 100644
+index 34a108bdb..670720868 100644
--- a/gss-serv-krb5.c
+++ b/gss-serv-krb5.c
@@ -43,6 +43,7 @@
@@ -161,7 +161,7 @@ index 723509409..fc7cabc09 100644
return retval;
}
diff --git a/gss-serv.c b/gss-serv.c
-index 5bc31289e..66d92e4fe 100644
+index d8e1c626a..4a13e91ba 100644
--- a/gss-serv.c
+++ b/gss-serv.c
@@ -55,7 +55,7 @@ extern ServerOptions options;
@@ -273,8 +273,8 @@ index 5bc31289e..66d92e4fe 100644
/* Extract the client details from a given context. This can only reliably
* be called once for a context */
-@@ -387,6 +480,12 @@ ssh_gssapi_getclient(Gssctxt *ctx, ssh_gssapi_client *client)
- }
+@@ -396,6 +489,12 @@ ssh_gssapi_getclient(Gssctxt *ctx, ssh_gssapi_client *client)
+ gss_release_buffer(&ctx->minor, &ename);
gss_release_buffer(&ctx->minor, &ename);
+ /* Retrieve authentication indicators, if they exist */
@@ -286,7 +286,7 @@ index 5bc31289e..66d92e4fe 100644
/* We can't copy this structure, so we just move the pointer to it */
client->creds = ctx->client_creds;
-@@ -458,10 +557,17 @@ void
+@@ -467,10 +566,17 @@ void
ssh_gssapi_cleanup_global_client()
{
OM_uint32 lmin;
diff --git a/0047-NIST-curves-hybrid-KEX-implementation.patch b/0047-NIST-curves-hybrid-KEX-implementation.patch
index c64976b..44b7302 100644
--- a/0047-NIST-curves-hybrid-KEX-implementation.patch
+++ b/0047-NIST-curves-hybrid-KEX-implementation.patch
@@ -1,17 +1,17 @@
-From ba13f7f17189c53dc2d4518b3d217124892671ce Mon Sep 17 00:00:00 2001
+From 6458eed30112d2f4b478976e17c509d4085ccb08 Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Mon, 20 Oct 2025 16:07:31 +0200
-Subject: [PATCH 47/53] NIST curves hybrid KEX implementation
+Subject: [PATCH 47/55] NIST curves hybrid KEX implementation
---
compat.c | 23 +-
compat.h | 1 +
crypto_api.h | 5 +
- kex-names.c | 91 ++++-
+ kex-names.c | 91 +++-
kex.c | 1 +
kex.h | 20 +-
kexgen.c | 67 ++-
- kexmlkem768x25519.c | 680 +++++++++++++++++++++++++++++--
+ kexmlkem768x25519.c | 683 +++++++++++++++++++++++++++++--
monitor.c | 2 +
myproposal.h | 4 +
regress/unittests/kex/test_kex.c | 4 +
@@ -19,7 +19,7 @@ Subject: [PATCH 47/53] NIST curves hybrid KEX implementation
ssh_api.c | 6 +-
sshconnect2.c | 3 +-
sshd-auth.c | 2 +
- 15 files changed, 852 insertions(+), 60 deletions(-)
+ 15 files changed, 855 insertions(+), 60 deletions(-)
diff --git a/compat.c b/compat.c
index 4312510e5..e6c7935d4 100644
@@ -447,7 +447,7 @@ index 32968e1f1..d3d8ac93e 100644
r = SSH_ERR_INVALID_ARGUMENT;
break;
diff --git a/kexmlkem768x25519.c b/kexmlkem768x25519.c
-index 36658120f..03efb788f 100644
+index 36658120f..2f27b13a8 100644
--- a/kexmlkem768x25519.c
+++ b/kexmlkem768x25519.c
@@ -45,19 +45,34 @@
@@ -665,7 +665,7 @@ index 36658120f..03efb788f 100644
*server_blobp = NULL;
*shared_secretp = NULL;
-@@ -529,6 +614,520 @@ kex_kem_mlkem768x25519_dec(struct kex *kex,
+@@ -529,6 +614,523 @@ kex_kem_mlkem768x25519_dec(struct kex *kex,
return r;
#endif
}
@@ -1010,9 +1010,12 @@ index 36658120f..03efb788f 100644
+
+ /* generate ECDH key pair, store server pubkey after ciphertext */
+ server_key = nist_pkey_keygen(server_key_len);
++ if (server_key == NULL) {
++ r = SSH_ERR_LIBCRYPTO_ERROR;
++ goto out;
++ }
+
-+ if ((server_key == NULL) ||
-+ (r = get_uncompressed_ec_pubkey(server_key, server_pub, server_key_len) != 0) ||
++ if ((r = get_uncompressed_ec_pubkey(server_key, server_pub, server_key_len) != 0) ||
+ (r = sshbuf_put(buf, secret, sizeof(secret))) != 0 ||
+ (r = sshbuf_put(server_blob, enc_out, enc_out_len) != 0)||
+ (r = sshbuf_put(server_blob, server_pub, server_key_len)) != 0)
@@ -1186,7 +1189,7 @@ index 36658120f..03efb788f 100644
#else /* USE_MLKEM768X25519 */
int
kex_kem_mlkem768x25519_keypair(struct kex *kex)
-@@ -550,4 +1149,39 @@ kex_kem_mlkem768x25519_dec(struct kex *kex,
+@@ -550,4 +1152,39 @@ kex_kem_mlkem768x25519_dec(struct kex *kex,
{
return SSH_ERR_SIGN_ALG_UNSUPPORTED;
}
diff --git a/0048-openssh-7.3p1-x11-max-displays.patch b/0048-openssh-7.3p1-x11-max-displays.patch
index 10a3ef6..62c8b9c 100644
--- a/0048-openssh-7.3p1-x11-max-displays.patch
+++ b/0048-openssh-7.3p1-x11-max-displays.patch
@@ -1,7 +1,7 @@
-From e390af2fd555754b9c311e8369fad452c22ade8b Mon Sep 17 00:00:00 2001
+From 6fb8b9110d1195ff2c4488bb3d49c1ad70234f74 Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Fri, 12 Dec 2025 15:35:14 +0100
-Subject: [PATCH 48/53] openssh-7.3p1-x11-max-displays
+Subject: [PATCH 48/55] openssh-7.3p1-x11-max-displays
Move MAX_DISPLAYS to a configuration option (#1341302)
---
diff --git a/0049-Fix-ssh-pkcs11-client-helper-termination.patch b/0049-Fix-ssh-pkcs11-client-helper-termination.patch
index 817a550..b27166a 100644
--- a/0049-Fix-ssh-pkcs11-client-helper-termination.patch
+++ b/0049-Fix-ssh-pkcs11-client-helper-termination.patch
@@ -1,7 +1,7 @@
-From 39970245627d15f7f1b1b9db595a74df301aac0a Mon Sep 17 00:00:00 2001
+From 855e024a1ae44cb0b0d4aa98a8d4d62147073f2a Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Mon, 13 Apr 2026 14:59:26 +0200
-Subject: [PATCH 49/53] Fix ssh-pkcs11-client helper termination
+Subject: [PATCH 49/55] Fix ssh-pkcs11-client helper termination
Don't terminate the PKCS#11 helper when SSH2_AGENT_FAILURE is returned.
This is a legitimate response when a token requires PIN authentication.
diff --git a/0050-openssh-10.2p1-pam-auth.patch b/0050-openssh-10.2p1-pam-auth.patch
index 13b1c99..366134e 100644
--- a/0050-openssh-10.2p1-pam-auth.patch
+++ b/0050-openssh-10.2p1-pam-auth.patch
@@ -1,7 +1,7 @@
-From 83dde2fe2227bce004d200b553c37a58942c4565 Mon Sep 17 00:00:00 2001
+From 9cc9ee2ce260e6796f6548737d2224b77dfb4c80 Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Sun, 12 Apr 2026 12:25:04 +0200
-Subject: [PATCH 50/53] openssh-10.2p1-pam-auth
+Subject: [PATCH 50/55] openssh-10.2p1-pam-auth
https://bugzilla.redhat.com/show_bug.cgi?id=2423900
diff --git a/0051-gssapi-s4u.patch b/0051-gssapi-s4u.patch
index 0dd1991..70952c2 100644
--- a/0051-gssapi-s4u.patch
+++ b/0051-gssapi-s4u.patch
@@ -1,7 +1,7 @@
-From 467b4214eecc48e620c0bd60f1e2f1473a5fe7ca Mon Sep 17 00:00:00 2001
+From 034fa6fd4b2a273e4e689da66258709039841da2 Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Sun, 12 Apr 2026 12:25:21 +0200
-Subject: [PATCH 51/53] gssapi-s4u
+Subject: [PATCH 51/55] gssapi-s4u
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
---
@@ -17,10 +17,10 @@ Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
9 files changed, 850 insertions(+), 20 deletions(-)
diff --git a/auth-krb5.c b/auth-krb5.c
-index 2e3c1c80f..9cd3618b2 100644
+index d0784ddeb..23230e970 100644
--- a/auth-krb5.c
+++ b/auth-krb5.c
-@@ -465,6 +465,19 @@ ssh_krb5_cc_new_unique(krb5_context ctx, krb5_ccache *ccache, int *need_environm
+@@ -476,6 +476,19 @@ ssh_krb5_cc_new_unique(krb5_context ctx, krb5_ccache *ccache, int *need_environm
* a primary cache for this collection, if it supports that (non-FILE)
*/
if (krb5_cc_support_switch(ctx, type)) {
@@ -34,12 +34,12 @@ index 2e3c1c80f..9cd3618b2 100644
+ if (krb5_cc_default(ctx, ccache) == 0) {
+ debug3_f("reusing existing default ccache of type %s",
+ type);
-+ free(type);
-+ return 0;
++ ret = 0;
++ goto out;
+ }
debug3_f("calling cc_new_unique(%s)", ccname);
ret = krb5_cc_new_unique(ctx, type, NULL, ccache);
- free(type);
+ if (ret)
diff --git a/configure.ac b/configure.ac
index e850041fb..4d65e4d7e 100644
--- a/configure.ac
@@ -65,10 +65,10 @@ index e850041fb..4d65e4d7e 100644
fi
diff --git a/gss-serv-krb5.c b/gss-serv-krb5.c
-index fc7cabc09..06d450d4d 100644
+index 670720868..83ec0964f 100644
--- a/gss-serv-krb5.c
+++ b/gss-serv-krb5.c
-@@ -609,6 +609,231 @@ ssh_gssapi_krb5_updatecreds(ssh_gssapi_ccache *store,
+@@ -610,6 +610,231 @@ ssh_gssapi_krb5_updatecreds(ssh_gssapi_ccache *store,
return 1;
}
@@ -301,7 +301,7 @@ index fc7cabc09..06d450d4d 100644
"toWM5Slw5Ew8Mqkay+al2g==",
"Kerberos",
diff --git a/gss-serv.c b/gss-serv.c
-index 66d92e4fe..970386127 100644
+index 4a13e91ba..67fa98c43 100644
--- a/gss-serv.c
+++ b/gss-serv.c
@@ -55,7 +55,7 @@ extern ServerOptions options;
@@ -313,7 +313,7 @@ index 66d92e4fe..970386127 100644
ssh_gssapi_mech gssapi_null_mech =
{ NULL, NULL, {0, NULL}, NULL, NULL, NULL, NULL, NULL};
-@@ -493,26 +493,382 @@ ssh_gssapi_getclient(Gssctxt *ctx, ssh_gssapi_client *client)
+@@ -502,26 +502,382 @@ ssh_gssapi_getclient(Gssctxt *ctx, ssh_gssapi_client *client)
return (ctx->major);
}
diff --git a/0052-openssh-10.2p1-pkcs11-uri.patch b/0052-openssh-10.2p1-pkcs11-uri.patch
index 946b353..592cf70 100644
--- a/0052-openssh-10.2p1-pkcs11-uri.patch
+++ b/0052-openssh-10.2p1-pkcs11-uri.patch
@@ -1,14 +1,14 @@
-From a37213df8ee9fd4a35b438ce568a742e2b837191 Mon Sep 17 00:00:00 2001
+From a50b5c3e2f17d1b049b3cafbb5a06912772e7129 Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Mon, 15 Dec 2025 14:24:07 +0100
-Subject: [PATCH 52/53] openssh-10.2p1-pkcs11-uri
+Subject: [PATCH 52/55] openssh-10.2p1-pkcs11-uri
---
.depend | 1 +
Makefile.in | 26 +-
configure.ac | 37 ++
regress/Makefile | 5 +-
- regress/pkcs11-uri.sh | 411 ++++++++++++++++
+ regress/pkcs11-uri.sh | 447 ++++++++++++++++++
regress/unittests/Makefile | 2 +-
regress/unittests/pkcs11/tests.c | 353 ++++++++++++++
ssh-add.c | 46 +-
@@ -19,10 +19,11 @@ Subject: [PATCH 52/53] openssh-10.2p1-pkcs11-uri
ssh-pkcs11-uri.h | 46 ++
ssh-pkcs11.c | 771 ++++++++++++++++++++++---------
ssh-pkcs11.h | 4 +
- ssh.c | 104 ++++-
+ ssh.c | 108 ++++-
ssh_config.5 | 15 +
+ sshconnect2.c | 14 +
sshkey.c | 4 +
- 18 files changed, 2134 insertions(+), 272 deletions(-)
+ 19 files changed, 2188 insertions(+), 272 deletions(-)
create mode 100644 regress/pkcs11-uri.sh
create mode 100644 regress/unittests/pkcs11/tests.c
create mode 100644 ssh-pkcs11-uri.c
@@ -226,10 +227,10 @@ index fa19ada28..492112e80 100644
-d ${.CURDIR}/unittests/sshkey/testdata $${ARGS}; \
diff --git a/regress/pkcs11-uri.sh b/regress/pkcs11-uri.sh
new file mode 100644
-index 000000000..75a6f290a
+index 000000000..846d61d0b
--- /dev/null
+++ b/regress/pkcs11-uri.sh
-@@ -0,0 +1,411 @@
+@@ -0,0 +1,447 @@
+#
+# Copyright (c) 2017 Red Hat
+#
@@ -639,6 +640,42 @@ index 000000000..75a6f290a
+ ${SSHAGENT} -k > /dev/null
+fi
+
++trace "Test IdentitiesOnly=yes with PKCS#11 URI"
++# Set RSA key as authorized
++grep "RSA" $OBJ/token_keys > $OBJ/authorized_keys_$USER
++
++trace " (With IdentitiesOnly=yes, wrong key should fail)"
++# Configure to use ECDSA key with IdentitiesOnly, but RSA is authorized
++# Use ssh_proxy which already has BatchMode and IdentityFile entries removed
++cat > $OBJ/ssh_proxy_identonly << EOF
++IdentitiesOnly yes
++IdentityFile "pkcs11:id=%${ID2}?module-path=${TEST_SSH_PKCS11}"
++EOF
++cat $OBJ/ssh_proxy >> $OBJ/ssh_proxy_identonly
++
++echo ${TEST_SSH_PIN} | notty ${SSH} -F $OBJ/ssh_proxy_identonly somehost exit 5
++r=$?
++if [ $r -eq 5 ]; then
++ fail "FAIL: ssh with IdentitiesOnly=yes used wrong key (should fail)"
++fi
++
++trace " (With IdentitiesOnly=yes, correct key should succeed)"
++# Configure to use RSA key with IdentitiesOnly, RSA is authorized
++cat > $OBJ/ssh_proxy_identonly << EOF
++IdentitiesOnly yes
++IdentityFile "pkcs11:id=%${ID1}?module-path=${TEST_SSH_PKCS11}"
++EOF
++cat $OBJ/ssh_proxy >> $OBJ/ssh_proxy_identonly
++
++echo ${TEST_SSH_PIN} | notty ${SSH} -F $OBJ/ssh_proxy_identonly somehost exit 5
++r=$?
++if [ $r -ne 5 ]; then
++ fail "FAIL: ssh with IdentitiesOnly=yes and correct key failed (exit code $r)"
++fi
++
++# Cleanup
++rm -f $OBJ/ssh_proxy_identonly
++
+# Restore original ssh_proxy
+mv $OBJ/ssh_proxy_bak $OBJ/ssh_proxy
diff --git a/regress/unittests/Makefile b/regress/unittests/Makefile
@@ -3209,7 +3246,7 @@ index 1d0277a6d..13459644c 100644
const u_char *, size_t, const char *, const char *,
const char *, u_int);
diff --git a/ssh.c b/ssh.c
-index 68c16c79c..adc6d2f81 100644
+index 68c16c79c..186e6469e 100644
--- a/ssh.c
+++ b/ssh.c
@@ -848,6 +848,14 @@ main(int ac, char **av)
@@ -3235,14 +3272,15 @@ index 68c16c79c..adc6d2f81 100644
#endif
skip_connect:
-@@ -2360,6 +2369,45 @@ ssh_session2(struct ssh *ssh, const struct ssh_conn_info *cinfo)
+@@ -2360,6 +2369,47 @@ ssh_session2(struct ssh *ssh, const struct ssh_conn_info *cinfo)
options.escape_char : SSH_ESCAPECHAR_NONE, id);
}
+#ifdef ENABLE_PKCS11
+static void
+load_pkcs11_identity(char *pkcs11_uri, char *identity_files[],
-+ struct sshkey *identity_keys[], int *n_ids)
++ struct sshkey *identity_keys[], int *n_ids,
++ int identity_file_userprovided[], int userprovided)
+{
+ int nkeys, i;
+ struct sshkey **keys;
@@ -3269,6 +3307,7 @@ index 68c16c79c..adc6d2f81 100644
+ }
+ identity_keys[*n_ids] = keys[i];
+ identity_files[*n_ids] = pkcs11_uri_get(uri);
++ identity_file_userprovided[*n_ids] = userprovided;
+ (*n_ids)++;
+ }
+ free(keys);
@@ -3281,7 +3320,7 @@ index 68c16c79c..adc6d2f81 100644
/* Loads all IdentityFile and CertificateFile keys */
static void
load_public_identity_files(const struct ssh_conn_info *cinfo)
-@@ -2374,11 +2422,6 @@ load_public_identity_files(const struct ssh_conn_info *cinfo)
+@@ -2374,11 +2424,6 @@ load_public_identity_files(const struct ssh_conn_info *cinfo)
char *certificate_files[SSH_MAX_CERTIFICATE_FILES];
struct sshkey *certificates[SSH_MAX_CERTIFICATE_FILES];
int certificate_file_userprovided[SSH_MAX_CERTIFICATE_FILES];
@@ -3293,7 +3332,7 @@ index 68c16c79c..adc6d2f81 100644
n_ids = n_certs = 0;
memset(identity_files, 0, sizeof(identity_files));
-@@ -2391,33 +2434,46 @@ load_public_identity_files(const struct ssh_conn_info *cinfo)
+@@ -2391,33 +2436,48 @@ load_public_identity_files(const struct ssh_conn_info *cinfo)
sizeof(certificate_file_userprovided));
#ifdef ENABLE_PKCS11
@@ -3329,7 +3368,7 @@ index 68c16c79c..adc6d2f81 100644
+
+ /* Add it as any other IdentityFile */
+ cp = pkcs11_uri_get(uri);
-+ add_identity_file(&options, NULL, cp, 1);
++ add_identity_file(&options, NULL, cp, 0);
+ free(cp);
+
+ pkcs11_uri_cleanup(uri);
@@ -3350,7 +3389,9 @@ index 68c16c79c..adc6d2f81 100644
+ strncmp(name, PKCS11_URI_SCHEME,
+ strlen(PKCS11_URI_SCHEME)) == 0) {
+ load_pkcs11_identity(name, identity_files,
-+ identity_keys, &n_ids);
++ identity_keys, &n_ids,
++ identity_file_userprovided,
++ options.identity_file_userprovided[i]);
+ free(options.identity_files[i]);
+ continue;
+ }
@@ -3385,6 +3426,38 @@ index a4fbecf35..47d00970b 100644
.It Cm IgnoreUnknown
Specifies a pattern-list of unknown options to be ignored if they are
encountered in configuration parsing.
+diff --git a/sshconnect2.c b/sshconnect2.c
+index 20d7622a7..ed75cb1ce 100644
+--- a/sshconnect2.c
++++ b/sshconnect2.c
+@@ -75,6 +75,11 @@
+ #include "ssh-sk.h"
+ #include "sk-api.h"
+
++#ifdef ENABLE_PKCS11
++#include "ssh-pkcs11.h"
++#include "ssh-pkcs11-uri.h"
++#endif
++
+ #ifdef GSSAPI
+ #include "ssh-gss.h"
+ #endif
+@@ -2076,6 +2081,15 @@ pubkey_prepare(struct ssh *ssh, Authctxt *authctxt)
+ break;
+ }
+ }
++#ifdef ENABLE_PKCS11
++ /*
++ * User-provided PKCS11 URI doesn't need an plain-file with
++ * public key inside!
++ */
++ if (!found && id->userprovided &&
++ strncmp(id->filename, PKCS11_URI_SCHEME, strlen(PKCS11_URI_SCHEME)) == 0)
++ found = 1;
++#endif
+ /* If IdentitiesOnly set and key not found then don't use it */
+ if (!found && options.identities_only) {
+ TAILQ_REMOVE(&files, id, next);
diff --git a/sshkey.c b/sshkey.c
index 533b8ffa9..8560ba46a 100644
--- a/sshkey.c
diff --git a/0053-gssapi-tests.patch b/0053-gssapi-tests.patch
index 5d48c26..95aecfb 100644
--- a/0053-gssapi-tests.patch
+++ b/0053-gssapi-tests.patch
@@ -1,7 +1,7 @@
-From 3ae6218eb5b77a5d66158d570df485f9a4197bbf Mon Sep 17 00:00:00 2001
+From a2868d25c3691e8dc2defb70d7ac337f2b8056c9 Mon Sep 17 00:00:00 2001
From: Dmitry Belyavskiy <beldmit@gmail.com>
Date: Thu, 15 May 2025 13:43:28 +0200
-Subject: [PATCH 53/53] gssapi-tests
+Subject: [PATCH 53/55] gssapi-tests
---
regress/Makefile | 1 +
diff --git a/0054-Implement-ML-DSA-signature-algorithms-per-draft-sflu.patch b/0054-Implement-ML-DSA-signature-algorithms-per-draft-sflu.patch
new file mode 100644
index 0000000..2b073b3
--- /dev/null
+++ b/0054-Implement-ML-DSA-signature-algorithms-per-draft-sflu.patch
@@ -0,0 +1,1211 @@
+From f4fa836b143d3dd7bcbc872fad323e81fe8a4a25 Mon Sep 17 00:00:00 2001
+From: Dmitry Belyavskiy <beldmit@gmail.com>
+Date: Thu, 4 Jun 2026 17:36:31 +0200
+Subject: [PATCH 54/55] Implement ML-DSA signature algorithms per
+ draft-sfluhrer-ssh-mldsa-06
+
+Add ssh-mldsa-44, ssh-mldsa-65, and ssh-mldsa-87 public key algorithms
+using FIPS 204 (ML-DSA) via OpenSSL 3.5+ EVP API. Includes certificate
+variants and FIPS mode support.
+
+Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
+---
+ Makefile.in | 2 +-
+ authfd.c | 8 +
+ configure.ac | 40 ++-
+ myproposal.h | 16 +-
+ pathnames.h | 6 +
+ regress/cert-userkey.sh | 2 +
+ regress/hostkey-agent.sh | 2 +-
+ regress/keygen-comment.sh | 1 +
+ regress/keytype.sh | 6 +
+ regress/krl.sh | 1 +
+ regress/limit-keytype.sh | 6 +-
+ ssh-keygen.c | 16 ++
+ ssh-keyscan.c | 40 ++-
+ ssh-mldsa.c | 562 ++++++++++++++++++++++++++++++++++++++
+ sshd-auth.c | 15 +
+ sshd-session.c | 5 +
+ sshd.c | 5 +
+ sshkey.c | 80 ++++++
+ sshkey.h | 13 +
+ 19 files changed, 806 insertions(+), 20 deletions(-)
+ create mode 100644 ssh-mldsa.c
+
+diff --git a/Makefile.in b/Makefile.in
+index 2e8fe9f5c..78a6f2333 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -103,7 +103,7 @@ LIBSSH_OBJS=${LIBOPENSSH_OBJS} \
+ msg.o dns.o entropy.o gss-genr.o umac.o umac128.o \
+ smult_curve25519_ref.o \
+ poly1305.o chacha.o cipher-chachapoly.o cipher-chachapoly-libcrypto.o \
+- ssh-ed25519.o digest-openssl.o digest-libc.o \
++ ssh-ed25519.o ssh-mldsa.o digest-openssl.o digest-libc.o \
+ libcrux-mlkem-mldsa.o ssh-mldsa-eddsa.o \
+ hmac.o ed25519.o ed25519-openssl.o \
+ kex.o kex-names.o kexdh.o kexgex.o kexecdh.o kexc25519.o \
+diff --git a/authfd.c b/authfd.c
+index aef809fa6..8cc1be127 100644
+--- a/authfd.c
++++ b/authfd.c
+@@ -605,6 +605,14 @@ ssh_add_identity_constrained(int sock, struct sshkey *key,
+ case KEY_ECDSA_CERT:
+ case KEY_ECDSA_SK:
+ case KEY_ECDSA_SK_CERT:
++#ifdef OPENSSL_HAS_MLDSA
++ case KEY_MLDSA44:
++ case KEY_MLDSA44_CERT:
++ case KEY_MLDSA65:
++ case KEY_MLDSA65_CERT:
++ case KEY_MLDSA87:
++ case KEY_MLDSA87_CERT:
++#endif
+ #endif
+ case KEY_ED25519:
+ case KEY_ED25519_CERT:
+diff --git a/configure.ac b/configure.ac
+index 72ce8a224..be46dec2d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -13,7 +13,7 @@
+ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-AC_INIT([OpenSSH], [Portable], [openssh-unix-dev@mindrot.org])
++AC_INIT([OpenSSH],[Portable],[openssh-unix-dev@mindrot.org])
+ AC_CONFIG_MACRO_DIR([m4])
+ AC_CONFIG_SRCDIR([ssh.c])
+
+@@ -835,29 +835,22 @@ int main(void) { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
+ AC_DEFINE([SSH_TUN_PREPEND_AF], [1],
+ [Prepend the address family to IP tunnel traffic])
+ AC_MSG_CHECKING([if we have the Security Authorization Session API])
+- AC_TRY_COMPILE([#include <Security/AuthSession.h>],
+- [SessionCreate(0, 0);],
+- [ac_cv_use_security_session_api="yes"
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <Security/AuthSession.h>]], [[SessionCreate(0, 0);]])],[ac_cv_use_security_session_api="yes"
+ AC_DEFINE([USE_SECURITY_SESSION_API], [1],
+ [platform has the Security Authorization Session API])
+ LIBS="$LIBS -framework Security"
+- AC_MSG_RESULT([yes])],
+- [ac_cv_use_security_session_api="no"
++ AC_MSG_RESULT([yes])],[ac_cv_use_security_session_api="no"
+ AC_MSG_RESULT([no])])
+ AC_MSG_CHECKING([if we have an in-memory credentials cache])
+- AC_TRY_COMPILE(
+- [#include <Kerberos/Kerberos.h>],
+- [cc_context_t c;
+- (void) cc_initialize (&c, 0, NULL, NULL);],
+- [AC_DEFINE([USE_CCAPI], [1],
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <Kerberos/Kerberos.h>]], [[cc_context_t c;
++ (void) cc_initialize (&c, 0, NULL, NULL);]])],[AC_DEFINE([USE_CCAPI], [1],
+ [platform uses an in-memory credentials cache])
+ LIBS="$LIBS -framework Security"
+ AC_MSG_RESULT([yes])
+ if test "x$ac_cv_use_security_session_api" = "xno"; then
+ AC_MSG_ERROR([*** Need a security framework to use the credentials cache API ***])
+- fi],
+- [AC_MSG_RESULT([no])]
+- )
++ fi],[AC_MSG_RESULT([no])
++ ])
+ m4_pattern_allow([AU_IPv])
+ AC_CHECK_DECL([AU_IPv4], [],
+ AC_DEFINE([AU_IPv4], [0], [System only supports IPv4 audit records])
+@@ -3433,6 +3426,25 @@ if test "x$openssl" = "xyes" ; then
+ ;;
+ esac
+
++ AC_MSG_CHECKING([whether OpenSSL has ML-DSA support])
++ AC_LINK_IFELSE(
++ [AC_LANG_PROGRAM([[
++#include <openssl/evp.h>
++ ]], [[
++ EVP_PKEY_CTX *ctx;
++ ctx = EVP_PKEY_CTX_new_from_name(NULL, "ML-DSA-44", NULL);
++ if (ctx == NULL) return 1;
++ EVP_PKEY_CTX_free(ctx);
++ ]])],
++ [
++ AC_MSG_RESULT([yes])
++ AC_DEFINE([OPENSSL_HAS_MLDSA], [1],
++ [libcrypto has ML-DSA support])
++ ],
++ [
++ AC_MSG_RESULT([no])
++ ]
++ )
+ fi
+
+ # PKCS11/U2F depend on OpenSSL and dlopen().
+diff --git a/myproposal.h b/myproposal.h
+index 6c9045a89..a38ba11f4 100644
+--- a/myproposal.h
++++ b/myproposal.h
+@@ -62,7 +62,13 @@
+ "webauthn-sk-ecdsa-sha2-nistp256@openssh.com," \
+ "rsa-sha2-512," \
+ "rsa-sha2-256," \
+- "ssh-mldsa44-ed25519"
++ "ssh-mldsa44-ed25519," \
++ "ssh-mldsa-44-cert-v01@openssh.com," \
++ "ssh-mldsa-65-cert-v01@openssh.com," \
++ "ssh-mldsa-87-cert-v01@openssh.com," \
++ "ssh-mldsa-44," \
++ "ssh-mldsa-65," \
++ "ssh-mldsa-87"
+
+ #define KEX_FIPS_PK_ALG \
+ "ecdsa-sha2-nistp256-cert-v01@openssh.com," \
+@@ -74,7 +80,13 @@
+ "ecdsa-sha2-nistp384," \
+ "ecdsa-sha2-nistp521," \
+ "rsa-sha2-512," \
+- "rsa-sha2-256"
++ "rsa-sha2-256," \
++ "ssh-mldsa-44-cert-v01@openssh.com," \
++ "ssh-mldsa-65-cert-v01@openssh.com," \
++ "ssh-mldsa-87-cert-v01@openssh.com," \
++ "ssh-mldsa-44," \
++ "ssh-mldsa-65," \
++ "ssh-mldsa-87"
+
+ #define KEX_SERVER_ENCRYPT \
+ "chacha20-poly1305@openssh.com," \
+diff --git a/pathnames.h b/pathnames.h
+index a94aec6ac..a16cee7ec 100644
+--- a/pathnames.h
++++ b/pathnames.h
+@@ -40,6 +40,9 @@
+ #define _PATH_HOST_RSA_KEY_FILE SSHDIR "/ssh_host_rsa_key"
+ #define _PATH_HOST_ED25519_KEY_FILE SSHDIR "/ssh_host_ed25519_key"
+ #define _PATH_HOST_MLDSA44_ED25519_KEY_FILE SSHDIR "/ssh_host_mldsa44_ed25519_key"
++#define _PATH_HOST_MLDSA44_KEY_FILE SSHDIR "/ssh_host_mldsa44_key"
++#define _PATH_HOST_MLDSA65_KEY_FILE SSHDIR "/ssh_host_mldsa65_key"
++#define _PATH_HOST_MLDSA87_KEY_FILE SSHDIR "/ssh_host_mldsa87_key"
+ #define _PATH_DH_MODULI SSHDIR "/moduli"
+ #define _PATH_SCP_KILL_SWITCH SSHDIR "/disable_scp"
+
+@@ -96,6 +99,9 @@
+ #define _PATH_SSH_CLIENT_ID_ECDSA_SK _PATH_SSH_USER_DIR "/id_ecdsa_sk"
+ #define _PATH_SSH_CLIENT_ID_ED25519_SK _PATH_SSH_USER_DIR "/id_ed25519_sk"
+ #define _PATH_SSH_CLIENT_ID_MLDSA44_ED25519 _PATH_SSH_USER_DIR "/id_mldsa44_ed25519"
++#define _PATH_SSH_CLIENT_ID_MLDSA44 _PATH_SSH_USER_DIR "/id_mldsa44"
++#define _PATH_SSH_CLIENT_ID_MLDSA65 _PATH_SSH_USER_DIR "/id_mldsa65"
++#define _PATH_SSH_CLIENT_ID_MLDSA87 _PATH_SSH_USER_DIR "/id_mldsa87"
+
+ /*
+ * Configuration file in user's home directory. This file need not be
+diff --git a/regress/cert-userkey.sh b/regress/cert-userkey.sh
+index 81a5c040a..537498a41 100644
+--- a/regress/cert-userkey.sh
++++ b/regress/cert-userkey.sh
+@@ -35,6 +35,8 @@ kname() {
+ rsa-sha2-*) n="$1" ;;
+ sk-ecdsa-*) n="sk-ecdsa" ;;
+ sk-ssh-ed25519*) n="sk-ssh-ed25519" ;;
++ ssh-mldsa*) n=`echo "$1" | sed 's/@.*//'` ;;
++ mldsa-*) n="ssh-$1" ;;
+ # subshell because some seds will add a newline
+ *) n=$(echo $1 | sed 's/^rsa/ssh-rsa/;s/^ed/ssh-ed/;s/^mldsa/ssh-mldsa/') ;;
+ esac
+diff --git a/regress/hostkey-agent.sh b/regress/hostkey-agent.sh
+index 251d5258e..7bfdb191b 100644
+--- a/regress/hostkey-agent.sh
++++ b/regress/hostkey-agent.sh
+@@ -108,7 +108,7 @@ echo "UpdateHostkeys=yes" >> $OBJ/ssh_proxy
+ echo "GlobalKnownHostsFile=none" >> $OBJ/ssh_proxy
+
+ HOSTKEYALGS=""
+-for k in $SSH_KEYTYPES ; do
++for k in $SSH_ACCEPTED_KEYTYPES ; do
+ verbose "Addkey type $k"
+ echo "Hostkey $OBJ/agent-key.${k}" >> $OBJ/sshd_proxy
+ test -z "$HOSTKEYALGS" || HOSTKEYALGS="${HOSTKEYALGS},"
+diff --git a/regress/keygen-comment.sh b/regress/keygen-comment.sh
+index 5b5b8f84f..cd3aef845 100644
+--- a/regress/keygen-comment.sh
++++ b/regress/keygen-comment.sh
+@@ -31,6 +31,7 @@ for fmt in '' RFC4716 PKCS8 PEM; do
+ # stored in old formats.
+ case "$t" in
+ ssh-ed25519|ssh-mldsa44-ed25519|*openssh.com) test -z "$oldfmt" || continue ;;
++ ssh-mldsa-*) test "$fmt" = "PEM" && continue ;;
+ esac
+ comment="foo bar"
+ fmtarg=""
+diff --git a/regress/keytype.sh b/regress/keytype.sh
+index 95e164154..37334439f 100644
+--- a/regress/keytype.sh
++++ b/regress/keytype.sh
+@@ -18,6 +18,9 @@ for i in ${SSH_KEYTYPES}; do
+ sk-ssh-ed25519*) ktypes="$ktypes ed25519-sk" ;;
+ sk-ecdsa-sha2-nistp256*) ktypes="$ktypes ecdsa-sk" ;;
+ ssh-mldsa44-ed25519*) ktypes="$ktypes mldsa44-ed25519" ;;
++ ssh-mldsa-44) ktypes="$ktypes mldsa-44" ;;
++ ssh-mldsa-65) ktypes="$ktypes mldsa-65" ;;
++ ssh-mldsa-87) ktypes="$ktypes mldsa-87" ;;
+ esac
+ done
+
+@@ -44,6 +47,9 @@ kname_to_ktype() {
+ ed25519-sk) echo sk-ssh-ed25519@openssh.com;;
+ ecdsa-sk) echo sk-ecdsa-sha2-nistp256@openssh.com;;
+ mldsa44-ed25519) echo ssh-mldsa44-ed25519;;
++ mldsa-44) echo ssh-mldsa-44;;
++ mldsa-65) echo ssh-mldsa-65;;
++ mldsa-87) echo ssh-mldsa-87;;
+ esac
+ }
+
+diff --git a/regress/krl.sh b/regress/krl.sh
+index 37d9f171a..8620e864f 100644
+--- a/regress/krl.sh
++++ b/regress/krl.sh
+@@ -11,6 +11,7 @@ for t in $SSH_KEYTYPES; do
+ case "$t" in
+ ecdsa*) ktype2=ecdsa ;;
+ ssh-rsa) ktype3=rsa ;;
++ ssh-mldsa-44) ktype4=mldsa-44 ;;
+ sk-ssh-ed25519@openssh.com) ktype5=ed25519-sk ;;
+ sk-ecdsa-sha2-nistp256@openssh.com) ktype6=ecdsa-sk ;;
+ esac
+diff --git a/regress/limit-keytype.sh b/regress/limit-keytype.sh
+index 2f5b63a48..70843b309 100644
+--- a/regress/limit-keytype.sh
++++ b/regress/limit-keytype.sh
+@@ -13,10 +13,11 @@ mv $OBJ/ssh_proxy $OBJ/ssh_proxy.orig
+
+ ktype1=ed25519; ktype2=ed25519; ktype3=ed25519;
+ ktype4=ed25519; ktype5=ed25519; ktype6=ed25519;
+-for t in $SSH_KEYTYPES ; do
++for t in $SSH_KEYTYPES ; do
+ case "$t" in
+ ssh-rsa) ktype2=rsa ;;
+ ecdsa*) ktype3=ecdsa ;; # unused
++ ssh-mldsa-44) ktype4=mldsa-44 ;;
+ sk-ssh-ed25519@openssh.com) ktype5=ed25519-sk ;;
+ sk-ecdsa-sha2-nistp256@openssh.com) ktype6=ecdsa-sk ;;
+ esac
+@@ -77,6 +78,9 @@ keytype() {
+ rsa) printf "rsa-sha2-256,rsa-sha2-512,ssh-rsa" ;;
+ sk-ecdsa) printf "sk-ecdsa-*" ;;
+ sk-ssh-ed25519) printf "sk-ssh-ed25519-*" ;;
++ mldsa-44) printf "ssh-mldsa-44" ;;
++ mldsa-65) printf "ssh-mldsa-65" ;;
++ mldsa-87) printf "ssh-mldsa-87" ;;
+ esac
+ }
+
+diff --git a/ssh-keygen.c b/ssh-keygen.c
+index b20e246d3..30cfe55f9 100644
+--- a/ssh-keygen.c
++++ b/ssh-keygen.c
+@@ -279,6 +279,17 @@ ask_filename(struct passwd *pw, const char *prompt)
+ case KEY_MLDSA44_ED25519_CERT:
+ name = _PATH_SSH_CLIENT_ID_MLDSA44_ED25519;
+ break;
++#ifdef OPENSSL_HAS_MLDSA
++ case KEY_MLDSA44:
++ name = _PATH_SSH_CLIENT_ID_MLDSA44;
++ break;
++ case KEY_MLDSA65:
++ name = _PATH_SSH_CLIENT_ID_MLDSA65;
++ break;
++ case KEY_MLDSA87:
++ name = _PATH_SSH_CLIENT_ID_MLDSA87;
++ break;
++#endif
+ default:
+ fatal("bad key type");
+ }
+@@ -1053,6 +1064,11 @@ do_gen_all_hostkeys(struct passwd *pw)
+ #ifdef USE_MLDSA
+ { "mldsa44-ed25519", "MLDSA44-ED25519",
+ _PATH_HOST_MLDSA44_ED25519_KEY_FILE },
++#endif
++#ifdef OPENSSL_HAS_MLDSA
++ { "mldsa44", "MLDSA44",_PATH_HOST_MLDSA44_KEY_FILE },
++ { "mldsa65", "MLDSA65",_PATH_HOST_MLDSA65_KEY_FILE },
++ { "mldsa87", "MLDSA87",_PATH_HOST_MLDSA87_KEY_FILE },
+ #endif
+ { NULL, NULL, NULL }
+ };
+diff --git a/ssh-keyscan.c b/ssh-keyscan.c
+index b00d7ba08..c7d211e23 100644
+--- a/ssh-keyscan.c
++++ b/ssh-keyscan.c
+@@ -66,12 +66,25 @@ int ssh_port = SSH_DEFAULT_PORT;
+ #define KT_ECDSA_SK (1<<4)
+ #define KT_ED25519_SK (1<<5)
+ #define KT_MLDSA44_ED25519 (1<<6)
++#ifdef OPENSSL_HAS_MLDSA
++#define KT_MLDSA44 (1<<7)
++#define KT_MLDSA65 (1<<8)
++#define KT_MLDSA87 (1<<9)
++#endif
+
+ #define KT_MIN KT_RSA
++#ifdef OPENSSL_HAS_MLDSA
++#define KT_MAX KT_MLDSA87
++#else
+ #define KT_MAX KT_MLDSA44_ED25519
++#endif
+
+ int get_cert = 0;
+-int get_keytypes = KT_RSA|KT_ECDSA|KT_ED25519|KT_ECDSA_SK|KT_ED25519_SK|KT_MLDSA44_ED25519;
++int get_keytypes = KT_RSA|KT_ECDSA|KT_ED25519|KT_ECDSA_SK|KT_ED25519_SK|KT_MLDSA44_ED25519
++#ifdef OPENSSL_HAS_MLDSA
++ |KT_MLDSA44|KT_MLDSA65|KT_MLDSA87
++#endif
++ ;
+
+ int hash_hosts = 0; /* Hash hostname on output */
+
+@@ -285,6 +298,20 @@ keygrab_ssh2(con *c)
+ "sk-ssh-ed25519-cert-v01@openssh.com" :
+ "sk-ssh-ed25519@openssh.com";
+ break;
++#ifdef OPENSSL_HAS_MLDSA
++ case KT_MLDSA44:
++ myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = get_cert ?
++ "ssh-mldsa-44-cert-v01@openssh.com" : "ssh-mldsa-44";
++ break;
++ case KT_MLDSA65:
++ myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = get_cert ?
++ "ssh-mldsa-65-cert-v01@openssh.com" : "ssh-mldsa-65";
++ break;
++ case KT_MLDSA87:
++ myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = get_cert ?
++ "ssh-mldsa-87-cert-v01@openssh.com" : "ssh-mldsa-87";
++ break;
++#endif
+ default:
+ fatal("unknown key type %d", c->c_keytype);
+ break;
+@@ -775,6 +802,17 @@ main(int argc, char **argv)
+ case KEY_MLDSA44_ED25519:
+ get_keytypes |= KT_MLDSA44_ED25519;
+ break;
++#ifdef OPENSSL_HAS_MLDSA
++ case KEY_MLDSA44:
++ get_keytypes |= KT_MLDSA44;
++ break;
++ case KEY_MLDSA65:
++ get_keytypes |= KT_MLDSA65;
++ break;
++ case KEY_MLDSA87:
++ get_keytypes |= KT_MLDSA87;
++ break;
++#endif
+ case KEY_UNSPEC:
+ default:
+ fatal("Unknown key type \"%s\"", tname);
+diff --git a/ssh-mldsa.c b/ssh-mldsa.c
+new file mode 100644
+index 000000000..32b7a9fd4
+--- /dev/null
++++ b/ssh-mldsa.c
+@@ -0,0 +1,562 @@
++/*
++ * Copyright (c) 2026 Dmitry Belyavskiy
++ *
++ * Permission to use, copy, modify, and distribute this software for any
++ * purpose with or without fee is hereby granted, provided that the above
++ * copyright notice and this permission notice appear in all copies.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
++ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
++ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
++ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
++ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
++ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
++ */
++
++#include "includes.h"
++
++#if defined(WITH_OPENSSL) && defined(OPENSSL_HAS_MLDSA)
++
++#include <sys/types.h>
++#include <string.h>
++
++#include <openssl/evp.h>
++#include <openssl/fips.h>
++#include <openssl/core_names.h>
++#include <openssl/param_build.h>
++
++#include "log.h"
++#include "sshbuf.h"
++#include "ssherr.h"
++#define SSHKEY_INTERNAL
++#include "sshkey.h"
++
++#define FIPS_FALLBACK_PROPQ "provider=default,-fips"
++
++struct mldsa_params {
++ const char *alg_name;
++ const char *evp_name;
++ size_t pk_sz;
++ size_t sig_sz;
++};
++
++static const struct mldsa_params *
++mldsa_params_from_type(int type)
++{
++ static const struct mldsa_params params[] = {
++ { "ssh-mldsa-44", "ML-DSA-44", MLDSA44_PK_SZ, MLDSA44_SIG_SZ },
++ { "ssh-mldsa-65", "ML-DSA-65", MLDSA65_PK_SZ, MLDSA65_SIG_SZ },
++ { "ssh-mldsa-87", "ML-DSA-87", MLDSA87_PK_SZ, MLDSA87_SIG_SZ },
++ };
++ switch (sshkey_type_plain(type)) {
++ case KEY_MLDSA44: return ¶ms[0];
++ case KEY_MLDSA65: return ¶ms[1];
++ case KEY_MLDSA87: return ¶ms[2];
++ default: return NULL;
++ }
++}
++
++static void
++ssh_mldsa_cleanup(struct sshkey *k)
++{
++ EVP_PKEY_free(k->pkey);
++ k->pkey = NULL;
++}
++
++static int
++ssh_mldsa_equal(const struct sshkey *a, const struct sshkey *b)
++{
++ if (a->pkey == NULL || b->pkey == NULL)
++ return 0;
++ return EVP_PKEY_eq(a->pkey, b->pkey) == 1;
++}
++
++static int
++ssh_mldsa_serialize_public(const struct sshkey *key, struct sshbuf *b,
++ enum sshkey_serialize_rep opts)
++{
++ const struct mldsa_params *params;
++ u_char *pk = NULL;
++ size_t pklen = 0;
++ int r;
++
++ if (key->pkey == NULL)
++ return SSH_ERR_INVALID_ARGUMENT;
++ if ((params = mldsa_params_from_type(key->type)) == NULL)
++ return SSH_ERR_INTERNAL_ERROR;
++
++ if (EVP_PKEY_get_raw_public_key(key->pkey, NULL, &pklen) != 1)
++ return SSH_ERR_LIBCRYPTO_ERROR;
++ if (pklen != params->pk_sz)
++ return SSH_ERR_INVALID_FORMAT;
++ if ((pk = malloc(pklen)) == NULL)
++ return SSH_ERR_ALLOC_FAIL;
++ if (EVP_PKEY_get_raw_public_key(key->pkey, pk, &pklen) != 1) {
++ free(pk);
++ return SSH_ERR_LIBCRYPTO_ERROR;
++ }
++ r = sshbuf_put_string(b, pk, pklen);
++ free(pk);
++ return r;
++}
++
++static int
++ssh_mldsa_deserialize_public(const char *ktype, struct sshbuf *b,
++ struct sshkey *key)
++{
++ const struct mldsa_params *params;
++ u_char *pk = NULL;
++ size_t pklen = 0;
++ int r;
++
++ if ((params = mldsa_params_from_type(key->type)) == NULL)
++ return SSH_ERR_INTERNAL_ERROR;
++
++ if ((r = sshbuf_get_string(b, &pk, &pklen)) != 0)
++ return r;
++ if (pklen != params->pk_sz) {
++ freezero(pk, pklen);
++ return SSH_ERR_INVALID_FORMAT;
++ }
++
++ EVP_PKEY_free(key->pkey);
++ key->pkey = EVP_PKEY_new_raw_public_key_ex(NULL, params->evp_name,
++ NULL, pk, pklen);
++ freezero(pk, pklen);
++ if (key->pkey == NULL)
++ return SSH_ERR_LIBCRYPTO_ERROR;
++ return 0;
++}
++
++static int
++ssh_mldsa_serialize_private(const struct sshkey *key, struct sshbuf *b,
++ enum sshkey_serialize_rep opts)
++{
++ const struct mldsa_params *params;
++ u_char *pk = NULL, seed[32];
++ size_t pklen = 0, seedlen = 0;
++ int r;
++
++ if (key->pkey == NULL)
++ return SSH_ERR_INVALID_ARGUMENT;
++ if ((params = mldsa_params_from_type(key->type)) == NULL)
++ return SSH_ERR_INTERNAL_ERROR;
++
++ /* Serialize public key */
++ if (EVP_PKEY_get_raw_public_key(key->pkey, NULL, &pklen) != 1)
++ return SSH_ERR_LIBCRYPTO_ERROR;
++ if (pklen != params->pk_sz)
++ return SSH_ERR_INVALID_FORMAT;
++ if ((pk = malloc(pklen)) == NULL)
++ return SSH_ERR_ALLOC_FAIL;
++ if (EVP_PKEY_get_raw_public_key(key->pkey, pk, &pklen) != 1) {
++ r = SSH_ERR_LIBCRYPTO_ERROR;
++ goto out;
++ }
++ if ((r = sshbuf_put_string(b, pk, pklen)) != 0)
++ goto out;
++
++ /* Extract and serialize 32-byte seed */
++ if (EVP_PKEY_get_octet_string_param(key->pkey,
++ OSSL_PKEY_PARAM_ML_DSA_SEED, seed, sizeof(seed), &seedlen) != 1) {
++ r = SSH_ERR_LIBCRYPTO_ERROR;
++ goto out;
++ }
++ if (seedlen != 32) {
++ r = SSH_ERR_INVALID_FORMAT;
++ goto out;
++ }
++ r = sshbuf_put_string(b, seed, 32);
++
++ out:
++ freezero(pk, pklen);
++ explicit_bzero(seed, sizeof(seed));
++ return r;
++}
++
++static int
++ssh_mldsa_deserialize_private(const char *ktype, struct sshbuf *b,
++ struct sshkey *key)
++{
++ const struct mldsa_params *params;
++ EVP_PKEY_CTX *pctx = NULL;
++ EVP_PKEY *pkey = NULL;
++ OSSL_PARAM params_array[2];
++ u_char *seed = NULL, *pk_orig = NULL, *pk_check = NULL;
++ size_t seedlen, pk_orig_len = 0, pk_check_len = 0;
++ int r;
++
++ if ((params = mldsa_params_from_type(key->type)) == NULL)
++ return SSH_ERR_INTERNAL_ERROR;
++
++ /* Deserialize public key first */
++ if ((r = ssh_mldsa_deserialize_public(NULL, b, key)) != 0)
++ return r;
++
++ /* Read 32-byte seed */
++ if ((r = sshbuf_get_string(b, &seed, &seedlen)) != 0)
++ return r;
++ if (seedlen != 32) {
++ r = SSH_ERR_INVALID_FORMAT;
++ goto out;
++ }
++
++ /* Create EVP_PKEY from seed using fromdata API */
++ if ((pctx = EVP_PKEY_CTX_new_from_name(NULL, params->evp_name,
++ NULL)) == NULL) {
++ r = SSH_ERR_LIBCRYPTO_ERROR;
++ goto out;
++ }
++
++ params_array[0] = OSSL_PARAM_construct_octet_string(
++ OSSL_PKEY_PARAM_ML_DSA_SEED, seed, 32);
++ params_array[1] = OSSL_PARAM_construct_end();
++
++ if (EVP_PKEY_fromdata_init(pctx) != 1 ||
++ EVP_PKEY_fromdata(pctx, &pkey, EVP_PKEY_KEYPAIR,
++ params_array) != 1) {
++ r = SSH_ERR_LIBCRYPTO_ERROR;
++ goto out;
++ }
++
++ /* Verify public key matches the one deserialized earlier */
++ if (EVP_PKEY_get_raw_public_key(pkey, NULL, &pk_check_len) != 1 ||
++ pk_check_len != params->pk_sz) {
++ r = SSH_ERR_LIBCRYPTO_ERROR;
++ goto out;
++ }
++ if ((pk_check = malloc(pk_check_len)) == NULL) {
++ r = SSH_ERR_ALLOC_FAIL;
++ goto out;
++ }
++ if (EVP_PKEY_get_raw_public_key(pkey, pk_check, &pk_check_len) != 1) {
++ r = SSH_ERR_LIBCRYPTO_ERROR;
++ goto out;
++ }
++
++ /* Get original public key for comparison */
++ if (EVP_PKEY_get_raw_public_key(key->pkey, NULL, &pk_orig_len) != 1) {
++ r = SSH_ERR_LIBCRYPTO_ERROR;
++ goto out;
++ }
++ if ((pk_orig = malloc(pk_orig_len)) == NULL) {
++ r = SSH_ERR_ALLOC_FAIL;
++ goto out;
++ }
++ if (EVP_PKEY_get_raw_public_key(key->pkey, pk_orig,
++ &pk_orig_len) != 1) {
++ r = SSH_ERR_LIBCRYPTO_ERROR;
++ goto out;
++ }
++
++ if (pk_check_len != pk_orig_len ||
++ timingsafe_bcmp(pk_check, pk_orig, pk_check_len) != 0) {
++ r = SSH_ERR_INVALID_FORMAT;
++ goto out;
++ }
++
++ /* Replace public-only pkey with full keypair */
++ EVP_PKEY_free(key->pkey);
++ key->pkey = pkey;
++ pkey = NULL;
++ r = 0;
++
++ out:
++ EVP_PKEY_CTX_free(pctx);
++ EVP_PKEY_free(pkey);
++ freezero(seed, seedlen);
++ free(pk_check);
++ free(pk_orig);
++ return r;
++}
++
++static int
++ssh_mldsa_generate(struct sshkey *k, int bits)
++{
++ const struct mldsa_params *params;
++ EVP_PKEY_CTX *ctx = NULL;
++ EVP_PKEY *pkey = NULL;
++ OSSL_PARAM gen_params[2];
++ int ret = SSH_ERR_INTERNAL_ERROR;
++
++ if ((params = mldsa_params_from_type(k->type)) == NULL)
++ return SSH_ERR_INTERNAL_ERROR;
++
++ ctx = EVP_PKEY_CTX_new_from_name(NULL, params->evp_name, NULL);
++ if (ctx == NULL && FIPS_mode())
++ ctx = EVP_PKEY_CTX_new_from_name(NULL, params->evp_name,
++ FIPS_FALLBACK_PROPQ);
++ if (ctx == NULL) {
++ ret = SSH_ERR_LIBCRYPTO_ERROR;
++ goto out;
++ }
++
++ /* Set retain_seed=yes to ensure seed is kept for serialization */
++ gen_params[0] = OSSL_PARAM_construct_utf8_string(
++ OSSL_PKEY_PARAM_ML_DSA_RETAIN_SEED, "yes", 0);
++ gen_params[1] = OSSL_PARAM_construct_end();
++
++ if (EVP_PKEY_keygen_init(ctx) <= 0 ||
++ EVP_PKEY_CTX_set_params(ctx, gen_params) != 1 ||
++ EVP_PKEY_keygen(ctx, &pkey) <= 0) {
++ ret = SSH_ERR_LIBCRYPTO_ERROR;
++ goto out;
++ }
++ k->pkey = pkey;
++ pkey = NULL;
++ ret = 0;
++ out:
++ EVP_PKEY_free(pkey);
++ EVP_PKEY_CTX_free(ctx);
++ return ret;
++}
++
++static int
++ssh_mldsa_copy_public(const struct sshkey *from, struct sshkey *to)
++{
++ const struct mldsa_params *params;
++ u_char *pk = NULL;
++ size_t pklen = 0;
++
++ if (from->pkey == NULL)
++ return 0;
++ if ((params = mldsa_params_from_type(from->type)) == NULL)
++ return SSH_ERR_INTERNAL_ERROR;
++
++ if (EVP_PKEY_get_raw_public_key(from->pkey, NULL, &pklen) != 1)
++ return SSH_ERR_LIBCRYPTO_ERROR;
++ if ((pk = malloc(pklen)) == NULL)
++ return SSH_ERR_ALLOC_FAIL;
++ if (EVP_PKEY_get_raw_public_key(from->pkey, pk, &pklen) != 1) {
++ free(pk);
++ return SSH_ERR_LIBCRYPTO_ERROR;
++ }
++
++ EVP_PKEY_free(to->pkey);
++ to->pkey = EVP_PKEY_new_raw_public_key_ex(NULL, params->evp_name,
++ NULL, pk, pklen);
++ free(pk);
++ if (to->pkey == NULL)
++ return SSH_ERR_LIBCRYPTO_ERROR;
++ return 0;
++}
++
++static int
++ssh_mldsa_sign(struct sshkey *key,
++ u_char **sigp, size_t *lenp,
++ const u_char *data, size_t datalen,
++ const char *alg, const char *sk_provider, const char *sk_pin, u_int compat)
++{
++ const struct mldsa_params *params;
++ EVP_MD_CTX *ctx = NULL;
++ struct sshbuf *b = NULL;
++ u_char *sig = NULL;
++ size_t slen = 0, len;
++ int ret = SSH_ERR_INTERNAL_ERROR;
++
++ if (lenp != NULL)
++ *lenp = 0;
++ if (sigp != NULL)
++ *sigp = NULL;
++
++ if (key == NULL || key->pkey == NULL)
++ return SSH_ERR_INVALID_ARGUMENT;
++ if ((params = mldsa_params_from_type(key->type)) == NULL)
++ return SSH_ERR_INTERNAL_ERROR;
++
++ slen = params->sig_sz;
++ if ((sig = malloc(slen)) == NULL)
++ return SSH_ERR_ALLOC_FAIL;
++
++ if ((ctx = EVP_MD_CTX_new()) == NULL) {
++ ret = SSH_ERR_ALLOC_FAIL;
++ goto out;
++ }
++ if (EVP_DigestSignInit(ctx, NULL, NULL, NULL, key->pkey) != 1 ||
++ EVP_DigestSign(ctx, sig, &slen, data, datalen) != 1) {
++ ret = SSH_ERR_LIBCRYPTO_ERROR;
++ goto out;
++ }
++ if (slen != params->sig_sz) {
++ ret = SSH_ERR_INTERNAL_ERROR;
++ goto out;
++ }
++
++ if ((b = sshbuf_new()) == NULL) {
++ ret = SSH_ERR_ALLOC_FAIL;
++ goto out;
++ }
++ if ((ret = sshbuf_put_cstring(b, params->alg_name)) != 0 ||
++ (ret = sshbuf_put_string(b, sig, slen)) != 0)
++ goto out;
++ len = sshbuf_len(b);
++ if (sigp != NULL) {
++ if ((*sigp = malloc(len)) == NULL) {
++ ret = SSH_ERR_ALLOC_FAIL;
++ goto out;
++ }
++ memcpy(*sigp, sshbuf_ptr(b), len);
++ }
++ if (lenp != NULL)
++ *lenp = len;
++ ret = 0;
++ out:
++ freezero(sig, slen);
++ sshbuf_free(b);
++ EVP_MD_CTX_free(ctx);
++ return ret;
++}
++
++static int
++ssh_mldsa_verify(const struct sshkey *key,
++ const u_char *sig, size_t siglen,
++ const u_char *data, size_t dlen, const char *alg, u_int compat,
++ struct sshkey_sig_details **detailsp)
++{
++ const struct mldsa_params *params;
++ EVP_MD_CTX *ctx = NULL;
++ struct sshbuf *b = NULL;
++ char *ktype = NULL;
++ const u_char *sigblob;
++ size_t slen;
++ int ret = SSH_ERR_INTERNAL_ERROR;
++
++ if (key == NULL || key->pkey == NULL ||
++ sig == NULL || siglen == 0)
++ return SSH_ERR_INVALID_ARGUMENT;
++ if ((params = mldsa_params_from_type(key->type)) == NULL)
++ return SSH_ERR_INTERNAL_ERROR;
++
++ if ((b = sshbuf_from(sig, siglen)) == NULL)
++ return SSH_ERR_ALLOC_FAIL;
++ if ((ret = sshbuf_get_cstring(b, &ktype, NULL)) != 0 ||
++ (ret = sshbuf_get_string_direct(b, &sigblob, &slen)) != 0)
++ goto out;
++ if (strcmp(params->alg_name, ktype) != 0) {
++ ret = SSH_ERR_KEY_TYPE_MISMATCH;
++ goto out;
++ }
++ if (sshbuf_len(b) != 0) {
++ ret = SSH_ERR_UNEXPECTED_TRAILING_DATA;
++ goto out;
++ }
++ if (slen != params->sig_sz) {
++ ret = SSH_ERR_INVALID_FORMAT;
++ goto out;
++ }
++
++ if ((ctx = EVP_MD_CTX_new()) == NULL) {
++ ret = SSH_ERR_ALLOC_FAIL;
++ goto out;
++ }
++ if (EVP_DigestVerifyInit(ctx, NULL, NULL, NULL, key->pkey) != 1) {
++ ret = SSH_ERR_LIBCRYPTO_ERROR;
++ goto out;
++ }
++ switch (EVP_DigestVerify(ctx, sigblob, slen, data, dlen)) {
++ case 1:
++ ret = 0;
++ break;
++ case 0:
++ ret = SSH_ERR_SIGNATURE_INVALID;
++ break;
++ default:
++ ret = SSH_ERR_LIBCRYPTO_ERROR;
++ break;
++ }
++ out:
++ EVP_MD_CTX_free(ctx);
++ sshbuf_free(b);
++ free(ktype);
++ return ret;
++}
++
++static const struct sshkey_impl_funcs sshkey_mldsa_funcs = {
++ /* .size = */ NULL,
++ /* .alloc = */ NULL,
++ /* .cleanup = */ ssh_mldsa_cleanup,
++ /* .equal = */ ssh_mldsa_equal,
++ /* .ssh_serialize_public = */ ssh_mldsa_serialize_public,
++ /* .ssh_deserialize_public = */ ssh_mldsa_deserialize_public,
++ /* .ssh_serialize_private = */ ssh_mldsa_serialize_private,
++ /* .ssh_deserialize_private = */ ssh_mldsa_deserialize_private,
++ /* .generate = */ ssh_mldsa_generate,
++ /* .copy_public = */ ssh_mldsa_copy_public,
++ /* .sign = */ ssh_mldsa_sign,
++ /* .verify = */ ssh_mldsa_verify,
++};
++
++const struct sshkey_impl sshkey_mldsa44_impl = {
++ /* .name = */ "ssh-mldsa-44",
++ /* .shortname = */ "MLDSA-44",
++ /* .sigalg = */ NULL,
++ /* .type = */ KEY_MLDSA44,
++ /* .nid = */ 0,
++ /* .cert = */ 0,
++ /* .sigonly = */ 0,
++ /* .keybits = */ 256,
++ /* .funcs = */ &sshkey_mldsa_funcs,
++};
++
++const struct sshkey_impl sshkey_mldsa65_impl = {
++ /* .name = */ "ssh-mldsa-65",
++ /* .shortname = */ "MLDSA-65",
++ /* .sigalg = */ NULL,
++ /* .type = */ KEY_MLDSA65,
++ /* .nid = */ 0,
++ /* .cert = */ 0,
++ /* .sigonly = */ 0,
++ /* .keybits = */ 384,
++ /* .funcs = */ &sshkey_mldsa_funcs,
++};
++
++const struct sshkey_impl sshkey_mldsa87_impl = {
++ /* .name = */ "ssh-mldsa-87",
++ /* .shortname = */ "MLDSA-87",
++ /* .sigalg = */ NULL,
++ /* .type = */ KEY_MLDSA87,
++ /* .nid = */ 0,
++ /* .cert = */ 0,
++ /* .sigonly = */ 0,
++ /* .keybits = */ 512,
++ /* .funcs = */ &sshkey_mldsa_funcs,
++};
++
++const struct sshkey_impl sshkey_mldsa44_cert_impl = {
++ /* .name = */ "ssh-mldsa-44-cert-v01@openssh.com",
++ /* .shortname = */ "MLDSA-44-CERT",
++ /* .sigalg = */ NULL,
++ /* .type = */ KEY_MLDSA44_CERT,
++ /* .nid = */ 0,
++ /* .cert = */ 1,
++ /* .sigonly = */ 0,
++ /* .keybits = */ 256,
++ /* .funcs = */ &sshkey_mldsa_funcs,
++};
++
++const struct sshkey_impl sshkey_mldsa65_cert_impl = {
++ /* .name = */ "ssh-mldsa-65-cert-v01@openssh.com",
++ /* .shortname = */ "MLDSA-65-CERT",
++ /* .sigalg = */ NULL,
++ /* .type = */ KEY_MLDSA65_CERT,
++ /* .nid = */ 0,
++ /* .cert = */ 1,
++ /* .sigonly = */ 0,
++ /* .keybits = */ 384,
++ /* .funcs = */ &sshkey_mldsa_funcs,
++};
++
++const struct sshkey_impl sshkey_mldsa87_cert_impl = {
++ /* .name = */ "ssh-mldsa-87-cert-v01@openssh.com",
++ /* .shortname = */ "MLDSA-87-CERT",
++ /* .sigalg = */ NULL,
++ /* .type = */ KEY_MLDSA87_CERT,
++ /* .nid = */ 0,
++ /* .cert = */ 1,
++ /* .sigonly = */ 0,
++ /* .keybits = */ 512,
++ /* .funcs = */ &sshkey_mldsa_funcs,
++};
++
++#endif /* WITH_OPENSSL && OPENSSL_HAS_MLDSA */
+diff --git a/sshd-auth.c b/sshd-auth.c
+index 80fc024c3..1f1460a5b 100644
+--- a/sshd-auth.c
++++ b/sshd-auth.c
+@@ -252,6 +252,11 @@ list_hostkey_types(void)
+ case KEY_MLDSA44_ED25519:
+ case KEY_ECDSA_SK:
+ case KEY_ED25519_SK:
++#ifdef OPENSSL_HAS_MLDSA
++ case KEY_MLDSA44:
++ case KEY_MLDSA65:
++ case KEY_MLDSA87:
++#endif
+ append_hostkey_type(b, sshkey_ssh_name(key));
+ break;
+ }
+@@ -272,6 +277,11 @@ list_hostkey_types(void)
+ case KEY_MLDSA44_ED25519_CERT:
+ case KEY_ECDSA_SK_CERT:
+ case KEY_ED25519_SK_CERT:
++#ifdef OPENSSL_HAS_MLDSA
++ case KEY_MLDSA44_CERT:
++ case KEY_MLDSA65_CERT:
++ case KEY_MLDSA87_CERT:
++#endif
+ append_hostkey_type(b, sshkey_ssh_name(key));
+ break;
+ }
+@@ -297,6 +307,11 @@ get_hostkey_public_by_type(int type, int nid, struct ssh *ssh)
+ case KEY_MLDSA44_ED25519_CERT:
+ case KEY_ECDSA_SK_CERT:
+ case KEY_ED25519_SK_CERT:
++#ifdef OPENSSL_HAS_MLDSA
++ case KEY_MLDSA44_CERT:
++ case KEY_MLDSA65_CERT:
++ case KEY_MLDSA87_CERT:
++#endif
+ key = host_certificates[i];
+ break;
+ default:
+diff --git a/sshd-session.c b/sshd-session.c
+index 2f807b4ae..59fd30c25 100644
+--- a/sshd-session.c
++++ b/sshd-session.c
+@@ -500,6 +500,11 @@ get_hostkey_by_type(int type, int nid, int need_private, struct ssh *ssh)
+ case KEY_ECDSA_SK_CERT:
+ case KEY_ED25519_SK_CERT:
+ case KEY_MLDSA44_ED25519_CERT:
++#ifdef OPENSSL_HAS_MLDSA
++ case KEY_MLDSA44_CERT:
++ case KEY_MLDSA65_CERT:
++ case KEY_MLDSA87_CERT:
++#endif
+ key = sensitive_data.host_certificates[i];
+ break;
+ default:
+diff --git a/sshd.c b/sshd.c
+index ebc61a9d6..dddd0ebdf 100644
+--- a/sshd.c
++++ b/sshd.c
+@@ -1715,6 +1715,11 @@ main(int ac, char **av)
+ case KEY_MLDSA44_ED25519:
+ case KEY_ECDSA_SK:
+ case KEY_ED25519_SK:
++#ifdef OPENSSL_HAS_MLDSA
++ case KEY_MLDSA44:
++ case KEY_MLDSA65:
++ case KEY_MLDSA87:
++#endif
+ if (have_agent || key != NULL)
+ sensitive_data.have_ssh2_key = 1;
+ break;
+diff --git a/sshkey.c b/sshkey.c
+index 8560ba46a..2a91b95ac 100644
+--- a/sshkey.c
++++ b/sshkey.c
+@@ -117,6 +117,14 @@ extern const struct sshkey_impl sshkey_rsa_sha256_impl;
+ extern const struct sshkey_impl sshkey_rsa_sha256_cert_impl;
+ extern const struct sshkey_impl sshkey_rsa_sha512_impl;
+ extern const struct sshkey_impl sshkey_rsa_sha512_cert_impl;
++#ifdef OPENSSL_HAS_MLDSA
++extern const struct sshkey_impl sshkey_mldsa44_impl;
++extern const struct sshkey_impl sshkey_mldsa44_cert_impl;
++extern const struct sshkey_impl sshkey_mldsa65_impl;
++extern const struct sshkey_impl sshkey_mldsa65_cert_impl;
++extern const struct sshkey_impl sshkey_mldsa87_impl;
++extern const struct sshkey_impl sshkey_mldsa87_cert_impl;
++#endif
+ #endif /* WITH_OPENSSL */
+
+ static int ssh_gss_equal(const struct sshkey *, const struct sshkey *)
+@@ -218,6 +226,14 @@ const struct sshkey_impl * const keyimpls[] = {
+ &sshkey_rsa_sha256_cert_impl,
+ &sshkey_rsa_sha512_impl,
+ &sshkey_rsa_sha512_cert_impl,
++#ifdef OPENSSL_HAS_MLDSA
++ &sshkey_mldsa44_impl,
++ &sshkey_mldsa44_cert_impl,
++ &sshkey_mldsa65_impl,
++ &sshkey_mldsa65_cert_impl,
++ &sshkey_mldsa87_impl,
++ &sshkey_mldsa87_cert_impl,
++#endif
+ #endif /* WITH_OPENSSL */
+ &sshkey_gss_kex_impl,
+ NULL
+@@ -529,6 +545,12 @@ sshkey_type_plain(int type)
+ return KEY_MLDSA44_ED25519;
+ case KEY_ED25519_SK_CERT:
+ return KEY_ED25519_SK;
++ case KEY_MLDSA44_CERT:
++ return KEY_MLDSA44;
++ case KEY_MLDSA65_CERT:
++ return KEY_MLDSA65;
++ case KEY_MLDSA87_CERT:
++ return KEY_MLDSA87;
+ default:
+ return type;
+ }
+@@ -551,6 +573,12 @@ sshkey_type_certified(int type)
+ return KEY_MLDSA44_ED25519_CERT;
+ case KEY_ED25519_SK:
+ return KEY_ED25519_SK_CERT;
++ case KEY_MLDSA44:
++ return KEY_MLDSA44_CERT;
++ case KEY_MLDSA65:
++ return KEY_MLDSA65_CERT;
++ case KEY_MLDSA87:
++ return KEY_MLDSA87_CERT;
+ default:
+ return -1;
+ }
+@@ -3484,6 +3512,20 @@ sshkey_private_to_blob_pem_pkcs8(struct sshkey *key, struct sshbuf *buf,
+ success = pkey != NULL;
+ }
+ break;
++#endif
++#ifdef OPENSSL_HAS_MLDSA
++ case KEY_MLDSA44:
++ case KEY_MLDSA65:
++ case KEY_MLDSA87:
++ if (format == SSHKEY_PRIVATE_PEM) {
++ r = SSH_ERR_INVALID_FORMAT;
++ goto out;
++ } else {
++ pkey = key->pkey;
++ EVP_PKEY_up_ref(key->pkey);
++ success = 1;
++ }
++ break;
+ #endif
+ default:
+ success = 0;
+@@ -3531,6 +3573,14 @@ sshkey_private_to_fileblob(struct sshkey *key, struct sshbuf *blob,
+ case KEY_ECDSA:
+ case KEY_RSA:
+ case KEY_ED25519:
++#ifdef OPENSSL_HAS_MLDSA
++ case KEY_MLDSA44:
++ case KEY_MLDSA65:
++ case KEY_MLDSA87:
++ case KEY_MLDSA44_CERT:
++ case KEY_MLDSA65_CERT:
++ case KEY_MLDSA87_CERT:
++#endif
+ break; /* see below */
+ #else /* WITH_OPENSSL */
+ case KEY_ED25519:
+@@ -3767,6 +3817,36 @@ sshkey_parse_private_pem_fileblob(struct sshbuf *blob, int type,
+ sshbuf_dump_data(prv->ed25519_sk, ED25519_SK_SZ, stderr);
+ #endif
+ #endif /* OPENSSL_HAS_ED25519 */
++#ifdef OPENSSL_HAS_MLDSA
++ } else if (EVP_PKEY_get0_type_name(pk) != NULL &&
++ strncmp(EVP_PKEY_get0_type_name(pk), "ML-DSA-", 7) == 0 &&
++ (type == KEY_UNSPEC || type == KEY_MLDSA44 ||
++ type == KEY_MLDSA65 || type == KEY_MLDSA87)) {
++ const char *pkey_type = EVP_PKEY_get0_type_name(pk);
++ int ktype;
++
++ if (strcmp(pkey_type, "ML-DSA-44") == 0)
++ ktype = KEY_MLDSA44;
++ else if (strcmp(pkey_type, "ML-DSA-65") == 0)
++ ktype = KEY_MLDSA65;
++ else if (strcmp(pkey_type, "ML-DSA-87") == 0)
++ ktype = KEY_MLDSA87;
++ else {
++ r = SSH_ERR_INVALID_FORMAT;
++ goto out;
++ }
++ if (type != KEY_UNSPEC && type != ktype) {
++ r = SSH_ERR_KEY_TYPE_MISMATCH;
++ goto out;
++ }
++ if ((prv = sshkey_new(KEY_UNSPEC)) == NULL) {
++ r = SSH_ERR_ALLOC_FAIL;
++ goto out;
++ }
++ prv->type = ktype;
++ EVP_PKEY_up_ref(pk);
++ prv->pkey = pk;
++#endif /* OPENSSL_HAS_MLDSA */
+ } else {
+ r = SSH_ERR_INVALID_FORMAT;
+ goto out;
+diff --git a/sshkey.h b/sshkey.h
+index 6a6e1908c..2bbb2ebc5 100644
+--- a/sshkey.h
++++ b/sshkey.h
+@@ -63,6 +63,12 @@ enum sshkey_types {
+ KEY_ED25519_SK_CERT,
+ KEY_MLDSA44_ED25519,
+ KEY_MLDSA44_ED25519_CERT,
++ KEY_MLDSA44,
++ KEY_MLDSA65,
++ KEY_MLDSA87,
++ KEY_MLDSA44_CERT,
++ KEY_MLDSA65_CERT,
++ KEY_MLDSA87_CERT,
+ KEY_NULL,
+ KEY_UNSPEC
+ };
+@@ -141,6 +147,13 @@ struct sshkey {
+ #define ED25519_SK_SZ crypto_sign_ed25519_SECRETKEYBYTES
+ #define ED25519_PK_SZ crypto_sign_ed25519_PUBLICKEYBYTES
+
++#define MLDSA44_PK_SZ 1312
++#define MLDSA44_SIG_SZ 2420
++#define MLDSA65_PK_SZ 1952
++#define MLDSA65_SIG_SZ 3309
++#define MLDSA87_PK_SZ 2592
++#define MLDSA87_SIG_SZ 4627
++
+ /* Additional fields contained in signature */
+ struct sshkey_sig_details {
+ uint32_t sk_counter; /* U2F signature counter */
+--
+2.56.0
+
diff --git a/0055-Use-golang.org-suffix-for-certificates.patch b/0055-Use-golang.org-suffix-for-certificates.patch
new file mode 100644
index 0000000..817c9f9
--- /dev/null
+++ b/0055-Use-golang.org-suffix-for-certificates.patch
@@ -0,0 +1,98 @@
+From 5a509db4cbb60cb227370f63b6f84867ef781676 Mon Sep 17 00:00:00 2001
+From: Dmitry Belyavskiy <beldmit@gmail.com>
+Date: Fri, 23 Oct 2026 14:22:07 +0200
+Subject: [PATCH 55/55] Use @golang.org suffix for certificates
+
+---
+ myproposal.h | 12 ++++++------
+ ssh-keyscan.c | 6 +++---
+ ssh-mldsa.c | 6 +++---
+ 3 files changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/myproposal.h b/myproposal.h
+index a38ba11f4..2e59278a1 100644
+--- a/myproposal.h
++++ b/myproposal.h
+@@ -63,9 +63,9 @@
+ "rsa-sha2-512," \
+ "rsa-sha2-256," \
+ "ssh-mldsa44-ed25519," \
+- "ssh-mldsa-44-cert-v01@openssh.com," \
+- "ssh-mldsa-65-cert-v01@openssh.com," \
+- "ssh-mldsa-87-cert-v01@openssh.com," \
++ "ssh-mldsa-44-cert-v01@golang.org," \
++ "ssh-mldsa-65-cert-v01@golang.org," \
++ "ssh-mldsa-87-cert-v01@golang.org," \
+ "ssh-mldsa-44," \
+ "ssh-mldsa-65," \
+ "ssh-mldsa-87"
+@@ -81,9 +81,9 @@
+ "ecdsa-sha2-nistp521," \
+ "rsa-sha2-512," \
+ "rsa-sha2-256," \
+- "ssh-mldsa-44-cert-v01@openssh.com," \
+- "ssh-mldsa-65-cert-v01@openssh.com," \
+- "ssh-mldsa-87-cert-v01@openssh.com," \
++ "ssh-mldsa-44-cert-v01@golang.org," \
++ "ssh-mldsa-65-cert-v01@golang.org," \
++ "ssh-mldsa-87-cert-v01@golang.org," \
+ "ssh-mldsa-44," \
+ "ssh-mldsa-65," \
+ "ssh-mldsa-87"
+diff --git a/ssh-keyscan.c b/ssh-keyscan.c
+index c7d211e23..a0efed081 100644
+--- a/ssh-keyscan.c
++++ b/ssh-keyscan.c
+@@ -301,15 +301,15 @@ keygrab_ssh2(con *c)
+ #ifdef OPENSSL_HAS_MLDSA
+ case KT_MLDSA44:
+ myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = get_cert ?
+- "ssh-mldsa-44-cert-v01@openssh.com" : "ssh-mldsa-44";
++ "ssh-mldsa-44-cert-v01@golang.org" : "ssh-mldsa-44";
+ break;
+ case KT_MLDSA65:
+ myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = get_cert ?
+- "ssh-mldsa-65-cert-v01@openssh.com" : "ssh-mldsa-65";
++ "ssh-mldsa-65-cert-v01@golang.org" : "ssh-mldsa-65";
+ break;
+ case KT_MLDSA87:
+ myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = get_cert ?
+- "ssh-mldsa-87-cert-v01@openssh.com" : "ssh-mldsa-87";
++ "ssh-mldsa-87-cert-v01@golang.org" : "ssh-mldsa-87";
+ break;
+ #endif
+ default:
+diff --git a/ssh-mldsa.c b/ssh-mldsa.c
+index 32b7a9fd4..72d4f7f25 100644
+--- a/ssh-mldsa.c
++++ b/ssh-mldsa.c
+@@ -524,7 +524,7 @@ const struct sshkey_impl sshkey_mldsa87_impl = {
+ };
+
+ const struct sshkey_impl sshkey_mldsa44_cert_impl = {
+- /* .name = */ "ssh-mldsa-44-cert-v01@openssh.com",
++ /* .name = */ "ssh-mldsa-44-cert-v01@golang.org",
+ /* .shortname = */ "MLDSA-44-CERT",
+ /* .sigalg = */ NULL,
+ /* .type = */ KEY_MLDSA44_CERT,
+@@ -536,7 +536,7 @@ const struct sshkey_impl sshkey_mldsa44_cert_impl = {
+ };
+
+ const struct sshkey_impl sshkey_mldsa65_cert_impl = {
+- /* .name = */ "ssh-mldsa-65-cert-v01@openssh.com",
++ /* .name = */ "ssh-mldsa-65-cert-v01@golang.org",
+ /* .shortname = */ "MLDSA-65-CERT",
+ /* .sigalg = */ NULL,
+ /* .type = */ KEY_MLDSA65_CERT,
+@@ -548,7 +548,7 @@ const struct sshkey_impl sshkey_mldsa65_cert_impl = {
+ };
+
+ const struct sshkey_impl sshkey_mldsa87_cert_impl = {
+- /* .name = */ "ssh-mldsa-87-cert-v01@openssh.com",
++ /* .name = */ "ssh-mldsa-87-cert-v01@golang.org",
+ /* .shortname = */ "MLDSA-87-CERT",
+ /* .sigalg = */ NULL,
+ /* .type = */ KEY_MLDSA87_CERT,
+--
+2.56.0
+
diff --git a/openssh.spec b/openssh.spec
index 0ae36ad..dad5ddb 100644
--- a/openssh.spec
+++ b/openssh.spec
@@ -39,7 +39,7 @@
Summary: An open source implementation of SSH protocol version 2
Name: openssh
Version: %{openssh_ver}
-Release: 1%{?dist}
+Release: 2%{?dist}
URL: http://www.openssh.com/portable.html
Source0: https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{version}.tar.gz
Source1: https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{version}.tar.gz.asc
@@ -114,6 +114,8 @@ Patch0050: 0050-openssh-10.2p1-pam-auth.patch
Patch0051: 0051-gssapi-s4u.patch
Patch0052: 0052-openssh-10.2p1-pkcs11-uri.patch
Patch0053: 0053-gssapi-tests.patch
+Patch0054: 0054-Implement-ML-DSA-signature-algorithms-per-draft-sflu.patch
+Patch0055: 0055-Use-golang.org-suffix-for-certificates.patch
License: BSD-3-Clause AND BSD-2-Clause AND ISC AND SSH-OpenSSH AND ssh-keyscan AND snprintf AND LicenseRef-Fedora-Public-Domain AND X11-distribute-modifications-variant
Requires: openssl-libs >= 1:3.5.0
@@ -522,6 +524,12 @@ test -f %{sysconfig_anaconda} && \
%attr(0755,root,root) %{_libdir}/sshtest/sk-dummy.so
%changelog
+* Wed Nov 04 2026 Dmitry Belyavskiy <dbelyavs@redhat.com> - 10.6p1-2
+- Providing IdentityFile support for PKCS#11 URI
+- Getting rid of some Kerberos/GSS related memory leaks
+- Enabling pure ML-DSA keys according to draft-sfluhrer-ssh-mldsa, using
+ @golang.org suffix for certificates
+
* Wed Oct 21 2026 Dmitry Belyavskiy <dbelyavs@redhat.com> - 10.6p1-1
- Rebasing OpenSSH to 10.6p1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-04 12:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-04 12:14 [rpms/openssh] rawhide: Enabling pure ML-DSA keys for SSH Dmitry Belyavskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox