Page MenuHomePhabricator

Gerrit ssh daemon does not offer post-quantum kex leading to a warning with OpenSSH 10
Open, LowPublic

Description

OpenSSH 10.1+ warns that Gerrit SSH daemon does not use post-quantum key exchange algorithm:

$ git fetch
** WARNING: connection is not using a post-quantum key exchange algorithm.
** This session may be vulnerable to "store now, decrypt later" attacks.
** The server may need to be upgraded. See https://openssh.com/pq.html

See https://www.openssh.com/pq.html

For Gerrit, it requires a change to an upstream library (Apache MINA SSHD). The library is bundled within Gerrit and upgraded as part of upgrading Gerrit itself.

It looks like the kex algo are sntrup761x25519-sha512 (OpenSSH 9.9) and additionally mlkem768x25519-sha256 (OpenSSH 10.0).

  • find whether the algo are implemented in Apache MINA SSHD
  • get the released version
  • find Gerrit version bundling the appropriate lib

Our Gerrit is, as of October 2025, version 3.10.6 which comes with Apache MINA SSHD 2.12.0. The kex it offers:

debug2: host key algorithms: ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,rsa-sha2-512,rsa-sha2-256

The warning can be disabled using:

~/.ssh/config
Host gerrit.wikimedia.org
    WarnWeakCrypto=no-pq-kex

Related Objects

StatusSubtypeAssignedTask
ResolvedNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
In ProgressABran-WMF
OpenNone
ResolvedABran-WMF
ResolvedABran-WMF
ResolvedMatthewVernon
ResolvedLSobanski
ResolvedABran-WMF
OpenABran-WMF
ResolvedLSobanski
Resolvedhashar
OpenABran-WMF
Resolvedhashar
ResolvedDzahn
In ProgressABran-WMF
ResolvedDzahn
OpenNone
Resolved Marostegui
ResolvedDzahn
OpenNone
ResolvedDzahn
ResolvedABran-WMF
ResolvedABran-WMF
ResolvedABran-WMF

Event Timeline

find whether the algo are implemented in Apache MINA SSHD
get the released version

According to #803 it gained support for mlkem768x25519-sha256 at some point, though I think that might not have made it into a proper release yet (only the upcoming 3.0.0-M2 if I’m not mistaken). Somewhat earlier, #498 added and #528 fixed sntrup761x25519-sha512; this was seemingly first released in sshd-2.13.2.

find Gerrit version bundling the appropriate lib

https://github.com/apache/mina-sshd/commit/4f2ccf885292adde1d3a0d5f9abd9fb513b07688 I think added support for post quantum algorithms I think? Which gerrit 3.11 uses (uses version 2.14 which has that commit).

(Emphasis added; the commit Paladox linked is the broken version I mentioned above, but if Gerrit 3.11 indeed uses MINA 2.14 then it should also have the fix from #528.)