Skip to content

Commit 8b5274c

Browse files
ssh: disallow gssapi-with-mic if GSSAPIWithMICConfig is not set
The ability to trigger the 'gssapi-with-mic' authentication method is not properly gated by the presence of the GSSAPIWithMICConfig field of the ServerConfig type. If this field is not set and a client sends a 'gssapi-with-mic' request, regardless of if the server advertises it, the server will panic. This issue was discovered and reported by Joern Schneewesiz, GitLab Security Research Team. Fixes CVE-2020-29652 Change-Id: Ie25de2766e442c8ab46680aae3ac89b0823cdeed Reviewed-on: https://go-review.googlesource.com/c/crypto/+/278852 Trust: Roland Shoemaker <[email protected]> Run-TryBot: Roland Shoemaker <[email protected]> Reviewed-by: Filippo Valsorda <[email protected]> TryBot-Result: Go Bot <[email protected]>
1 parent 5f87f34 commit 8b5274c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ssh/server.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,10 @@ userAuthLoop:
572572
perms = candidate.perms
573573
}
574574
case "gssapi-with-mic":
575+
if config.GSSAPIWithMICConfig == nil {
576+
authErr = errors.New("ssh: gssapi-with-mic auth not configured")
577+
break
578+
}
575579
gssapiConfig := config.GSSAPIWithMICConfig
576580
userAuthRequestGSSAPI, err := parseGSSAPIPayload(userAuthReq.Payload)
577581
if err != nil {

0 commit comments

Comments
 (0)