File tree Expand file tree Collapse file tree 4 files changed +16
-6
lines changed Expand file tree Collapse file tree 4 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ require (
23
23
// Please do not override. Once v16.11.1 is released, this comment
24
24
// can be removed.
25
25
gitlab.com/gitlab-org/gitaly/v16 v16.11.0-rc1.0.20250408053233-c6d43513e93c
26
- gitlab.com/gitlab-org/labkit v1.25 .0
26
+ gitlab.com/gitlab-org/labkit v1.26 .0
27
27
golang.org/x/crypto v0.41.0
28
28
golang.org/x/sync v0.16.0
29
29
google.golang.org/grpc v1.72.0
Original file line number Diff line number Diff line change @@ -554,8 +554,8 @@ gitlab.com/gitlab-org/gitaly/v16 v16.11.0-rc1.0.20250408053233-c6d43513e93c h1:x
554
554
gitlab.com/gitlab-org/gitaly/v16 v16.11.0-rc1.0.20250408053233-c6d43513e93c /go.mod h1:/rkj6992VsNymUeG6N3VnLZ8Pvb1Y9ZUo00Yy35t8WQ =
555
555
gitlab.com/gitlab-org/go/reopen v1.0.0 h1:6BujZ0lkkjGIejTUJdNO1w56mN1SI10qcVQyQlOPM+8 =
556
556
gitlab.com/gitlab-org/go/reopen v1.0.0 /go.mod h1:D6OID8YJDzEVZNYW02R/Pkj0v8gYFSIhXFTArAsBQw8 =
557
- gitlab.com/gitlab-org/labkit v1.25 .0 h1:ON+pf8hk5nmrFLwT4CVLniBf1kSYvBujyGp1+jW9++g =
558
- gitlab.com/gitlab-org/labkit v1.25 .0 /go.mod h1:ZHOQIOVQKeOEKvQ/GhGBjUNbV3zWsx8nty6D/SRCyd4 =
557
+ gitlab.com/gitlab-org/labkit v1.26 .0 h1:UMfo6S/VmYXwquddR++odEsuTphfZvqhxAs4240syTU =
558
+ gitlab.com/gitlab-org/labkit v1.26 .0 /go.mod h1:ZHOQIOVQKeOEKvQ/GhGBjUNbV3zWsx8nty6D/SRCyd4 =
559
559
go.etcd.io/raft/v3 v3.6.0 h1:5NtvbDVYpnfZWcIHgGRk9DyzkBIXOi8j+DDp1IcnUWQ =
560
560
go.etcd.io/raft/v3 v3.6.0 /go.mod h1:nLvLevg6+xrVtHUmVaTcTz603gQPHfh7kUAwV6YpfGo =
561
561
go.opencensus.io v0.21.0 /go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU =
Original file line number Diff line number Diff line change @@ -237,8 +237,14 @@ func (s *serverConfig) get(parentCtx context.Context) *ssh.ServerConfig {
237
237
// for previous versions that support both secure and insecure defaults.
238
238
if fips .Enabled () {
239
239
// This can be dropped once https://github.com/golang-fips/go/issues/316 is supported.
240
- // We need to constrain the list of supported algorithms for FIPS.
241
- algorithms := fips .SupportedAlgorithms ()
240
+ // We need to constrain the list of supported algorithms for FIPS because
241
+ // ED25519 algorithms cause gitlab-sshd to panic.
242
+ //
243
+ // Right now we use fips.DefaultAlgorithms() instead of fips.SupportedAlgorithms()
244
+ // to preserve backwards compatibility with clients that are not configured properly.
245
+ // fips.DefaultAlgorithms() still allows ssh-rsa and ssh-dss. Admins can lock down
246
+ // these algorithms by setting `public_key_algorithms`.
247
+ algorithms := fips .DefaultAlgorithms ()
242
248
sshCfg .PublicKeyAuthAlgorithms = algorithms .PublicKeyAuths
243
249
sshCfg .Ciphers = algorithms .Ciphers
244
250
sshCfg .KeyExchanges = algorithms .KeyExchanges
Original file line number Diff line number Diff line change @@ -255,13 +255,17 @@ func TestFipsDefaultAlgorithms(t *testing.T) {
255
255
srvCfg := & serverConfig {cfg : & config.Config {}}
256
256
sshServerConfig := srvCfg .get (context .Background ())
257
257
258
- algorithms := fips .SupportedAlgorithms ()
258
+ algorithms := fips .DefaultAlgorithms ()
259
259
260
260
require .Equal (t , algorithms .PublicKeyAuths , sshServerConfig .PublicKeyAuthAlgorithms )
261
261
require .Equal (t , algorithms .MACs , sshServerConfig .MACs )
262
262
require .Equal (t , algorithms .KeyExchanges , sshServerConfig .KeyExchanges )
263
263
require .Equal (t , algorithms .Ciphers , sshServerConfig .Ciphers )
264
264
265
+ // Ensure ssh-rsa and ssh-dss are there for backwards compatibility.
266
+ require .Contains (t , algorithms .PublicKeyAuths , "ssh-rsa" )
267
+ require .Contains (t , algorithms .PublicKeyAuths , "ssh-dss" )
268
+
265
269
sshServerConfig .SetDefaults ()
266
270
267
271
// Go automatically adds curve25519-sha256@libssh.org as alias for curve25519-sha256
You can’t perform that action at this time.
0 commit comments