Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/crypto/ssh: empty plaintext packet causes panic #49932

Closed
rolandshoemaker opened this issue Dec 2, 2021 · 2 comments
Closed

x/crypto/ssh: empty plaintext packet causes panic #49932

rolandshoemaker opened this issue Dec 2, 2021 · 2 comments

Comments

@rolandshoemaker
Copy link
Member

When using AES-GCM or ChaCha20Poly1305, consuming a malformed packet which contains empty plaintext causes a panic, due to the assumption that there will always be at least one byte, containing the number of padding bytes.

@gopherbot gopherbot added this to the Unreleased milestone Dec 2, 2021
@gopherbot
Copy link
Contributor

Change https://golang.org/cl/368814 mentions this issue: ssh: don't assume packet plaintext size

@dhcgn
Copy link

dhcgn commented Dec 3, 2021

This CVE 2021-43565 has a status of RESERVED by CVE, but should be public soon: https://nvd.nist.gov/vuln/detail/CVE-2021-43565

thaJeztah added a commit to thaJeztah/buildkit that referenced this issue Dec 3, 2021

Verified

This commit was signed with the committer’s verified signature.
sxzz Kevin Deng 三咲智子
full diff: golang/crypto@0c34fe9...5770296

includes a fix in golang.org/x/crypto/ssh for CVE-2021-43565

- golang/go#49932
- golang/crypto@5770296

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
thaJeztah added a commit to thaJeztah/docker that referenced this issue Dec 3, 2021

Verified

This commit was signed with the committer’s verified signature.
sxzz Kevin Deng 三咲智子
full diff: golang/crypto@0c34fe9...5770296

includes a fix in golang.org/x/crypto/ssh for CVE-2021-43565

- golang/go#49932
- golang/crypto@5770296

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
thaJeztah added a commit to thaJeztah/docker that referenced this issue Dec 3, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
full diff: golang/crypto@0c34fe9...5770296

includes a fix in golang.org/x/crypto/ssh for CVE-2021-43565

- golang/go#49932
- golang/crypto@5770296

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
wadey added a commit to slackhq/nebula that referenced this issue Dec 6, 2021
> Version v0.0.0-20211202192323-5770296d904e of golang.org/x/crypto fixes a vulnerability in the golang.org/x/crypto/ssh package which allowed unauthenticated clients to cause a panic in SSH servers.
>
> This issue was discovered and reported by Rod Hynes, Psiphon Inc., and is tracked as CVE-2021-43565 and Issue golang/go#49932.

    Updated  golang.org/x/crypto  golang/crypto@089bfa5...5770296
    Updated  golang.org/x/net     golang/net@4a448f8...69e39ba
wadey added a commit to slackhq/nebula that referenced this issue Dec 6, 2021
> Version v0.0.0-20211202192323-5770296d904e of golang.org/x/crypto fixes a vulnerability in the golang.org/x/crypto/ssh package which allowed unauthenticated clients to cause a panic in SSH servers.
>
> This issue was discovered and reported by Rod Hynes, Psiphon Inc., and is tracked as CVE-2021-43565 and Issue golang/go#49932.

    Updated  golang.org/x/crypto  golang/crypto@089bfa5...5770296
    Updated  golang.org/x/net     golang/net@4a448f8...69e39ba
vasiliy-ul added a commit to vasiliy-ul/kubevirt that referenced this issue Dec 21, 2021
Version v0.0.0-20211202192323-5770296d904e of golang.org/x/crypto fixes
a vulnerability in the golang.org/x/crypto/ssh package which allowed
unauthenticated clients to cause a panic in SSH servers.

Reference:
golang/go#49932
golang/crypto@5770296
https://bugzilla.redhat.com/show_bug.cgi?id=2030787
https://bugzilla.suse.com/show_bug.cgi?id=1193930
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-43565

Signed-off-by: Vasiliy Ulyanov <vulyanov@suse.de>
kubevirt-bot pushed a commit to kubevirt-bot/kubevirt that referenced this issue Dec 21, 2021
Version v0.0.0-20211202192323-5770296d904e of golang.org/x/crypto fixes
a vulnerability in the golang.org/x/crypto/ssh package which allowed
unauthenticated clients to cause a panic in SSH servers.

Reference:
golang/go#49932
golang/crypto@5770296
https://bugzilla.redhat.com/show_bug.cgi?id=2030787
https://bugzilla.suse.com/show_bug.cgi?id=1193930
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-43565

Signed-off-by: Vasiliy Ulyanov <vulyanov@suse.de>
evol262 pushed a commit to evol262/moby that referenced this issue Jan 12, 2022
full diff: golang/crypto@0c34fe9...5770296

includes a fix in golang.org/x/crypto/ssh for CVE-2021-43565

- golang/go#49932
- golang/crypto@5770296

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
iamacarpet pushed a commit to affordablemobiles/xcrypto that referenced this issue Aug 2, 2022
When reading GCM and ChaChaPoly1305 packets, don't make assumptions
about the size of the enciphered plaintext. This fixes two panics
caused by standards non-compliant malformed packets.

Thanks to Rod Hynes, Psiphon Inc. for reporting this issue.

Fixes golang/go#49932
Fixes CVE-2021-43565

Change-Id: I660cff39d197e0d04ec44d11d792b22d954df2ef
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1262659
Reviewed-by: Katie Hockman <katiehockman@google.com>
Reviewed-by: Julie Qiu <julieqiu@google.com>
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/368814
Trust: Roland Shoemaker <roland@golang.org>
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
@golang golang locked and limited conversation to collaborators Dec 3, 2022
LewiGoddard pushed a commit to LewiGoddard/crypto that referenced this issue Feb 16, 2023
When reading GCM and ChaChaPoly1305 packets, don't make assumptions
about the size of the enciphered plaintext. This fixes two panics
caused by standards non-compliant malformed packets.

Thanks to Rod Hynes, Psiphon Inc. for reporting this issue.

Fixes golang/go#49932
Fixes CVE-2021-43565

Change-Id: I660cff39d197e0d04ec44d11d792b22d954df2ef
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1262659
Reviewed-by: Katie Hockman <katiehockman@google.com>
Reviewed-by: Julie Qiu <julieqiu@google.com>
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/368814
Trust: Roland Shoemaker <roland@golang.org>
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
BiiChris pushed a commit to BiiChris/crypto that referenced this issue Sep 15, 2023
When reading GCM and ChaChaPoly1305 packets, don't make assumptions
about the size of the enciphered plaintext. This fixes two panics
caused by standards non-compliant malformed packets.

Thanks to Rod Hynes, Psiphon Inc. for reporting this issue.

Fixes golang/go#49932
Fixes CVE-2021-43565

Change-Id: I660cff39d197e0d04ec44d11d792b22d954df2ef
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1262659
Reviewed-by: Katie Hockman <katiehockman@google.com>
Reviewed-by: Julie Qiu <julieqiu@google.com>
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/368814
Trust: Roland Shoemaker <roland@golang.org>
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants