GO-2023-1987

See a problem?
Source
https://pkg.go.dev/vuln/GO-2023-1987
Import Source
https://vuln.go.dev/ID/GO-2023-1987.json
JSON Data
https://api.osv.dev/v1/vulns/GO-2023-1987
Aliases
Published
2023-08-02T17:25:58Z
Modified
2024-05-20T16:03:47Z
Summary
Large RSA keys can cause high CPU usage in crypto/tls
Details

Extremely large RSA keys in certificate chains can cause a client/server to expend significant CPU time verifying signatures.

With fix, the size of RSA keys transmitted during handshakes is restricted to <= 8192 bits.

Based on a survey of publicly trusted RSA keys, there are currently only three certificates in circulation with keys larger than this, and all three appear to be test certificates that are not actively deployed. It is possible there are larger keys in use in private PKIs, but we target the web PKI, so causing breakage here in the interests of increasing the default safety of users of crypto/tls seems reasonable.

References
Credits
    • Mateusz Poliwczak

Affected packages

Go / stdlib

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.19.12
Introduced
1.20.0-0
Fixed
1.20.7
Introduced
1.21.0-0
Fixed
1.21.0-rc.4

Ecosystem specific

{
    "imports": [
        {
            "path": "crypto/tls",
            "symbols": [
                "Conn.Handshake",
                "Conn.HandshakeContext",
                "Conn.Read",
                "Conn.Write",
                "Conn.processCertsFromClient",
                "Conn.verifyServerCertificate",
                "Dial",
                "DialWithDialer",
                "Dialer.Dial",
                "Dialer.DialContext"
            ]
        }
    ]
}