You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
crypto/tls: verifying certificate chains containing large RSA keys is slow [CVE-2023-29409] #61460
Clients and servers which request and verify client certificates can be forced to expend a large amount of time verifying certificate chains which contain very large RSA keys during TLS handshakes.
Thanks to Mateusz Poliwczak for reporting this issue.
We generally try to avoid introducing GODEBUG flags in security changes (and in minor releases in general), but if it is clear that there are people relying on this behavior in the wild, we can look into introducing a flag that configures this behavior in the next minor release.
My point is that golang has allowed users to customize via code which ciphers and TLS versions to use (including less secure options to a point). It has allowed users to customers to customize via code timeouts and maximum request sizes. Why was this any different?
Some things in crypto/tls are configurable for legacy or compatibility reasons, but conversely there are a number of things that are not configurable in crypto/tls. In particular, we don't support testing and research use cases through the public API, encouraging instead forks like uTLS, zcrypto/ztls, and BoGo.
To put the "extreme paranoia" angle in perspective, the NSA Commercial National Security Algorithm Suite requires 3072-bit keys all the way to Top Secret. The WebPKI root CAs have 4096-bit keys. Using keys larger than 8192 bits has no security justification, even in "extreme paranoia" threat models.
I would like to underline that 16k TLS keys is the standard upper limit in most OS for at least a decade. By making an arbitrary hardcoded limit to 8k keys breaks the standard compatibility. This should be a parameter and not hardcoded.
Also, limiting the RSA key size is a weird way to fix this issue. It's like "your car AC sometime leaks ? Well I'll fix this by removing the AC of all the cars of the same brand. Now there is no AC leak anymore, but you can't have fresh air when it's warm outside.". It's not a fix at all, it's limiting/removing a functionality because for a large minority of users, sometime, it takes a "long time" (whatever this means) to check the RSA key.
On a side note, qualifying 16k RSA keys of "extreme paranoia" is kind of condescendant with the users using them : you don't know the use cases, you can't make any kind of judgement.
Well, as this issue isn't really fixed but only hidden, out of curiosity, how will you react when the same issue will be reported to you with RSA 8k keys and light servers ? Will you rull out RSA 8k keys as well and states that you don't support light hardware ?
And next, when the same issue will be reported to you with IOT devices and RSA 4k keys, will you state that you don't support IOT devices and you will drop RSA support as well ?
The way this issue is fixed is ridiculous and against good developpement and security pratices.
Apologies but I fail to see how I've broken the code of conduct. The questions about 8k keys and IOT seem to be legitimate ones and their answers would allow me a better understanding of the GO team philosophy, especially about the security vision.
@Astaoth The code of conduct asks people to be charitable and respectful. There are ways to ask questions about Go development choices that do not predict what the response will be, and do not refer to what people are doing as ridiculous. Thanks.
@ianlancetaylor That's interresting : in this case how would judging people and organizations in a condescending manner without knowing the context or judging the people intents respect the Code of Conduct ? Or unwelcoming 15 char messages ?
Also may I underline that I would haven't made any more noise than necessary here if an appropriate answer would have been provided in first place ?
I apologize on behalf of other open source contributors for making you feel condescended to or unwelcome. That is not a pleasant feeling, and I'm sorry that it happened. My only defense is that I'm sure it was not intended. The principle of charity applies here in particular: please assume that people responding to you have good intentions.
Nobody is asking you to not make noise. We are asking you to make noise respectfully and charitably.
Finally, note that this is not a support forum; for appropriate forums for questions about using Go please see https://go.dev/wiki/Questions.
Activity
neild commentedon Jul 25, 2023
@gopherbot please open backport issues
gopherbot commentedon Jul 25, 2023
Backport issue(s) opened: #61579 (for 1.19), #61580 (for 1.20).
Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases.
gopherbot commentedon Aug 1, 2023
Change https://go.dev/cl/514915 mentions this issue:
[release-branch.go1.19] crypto/tls: restrict RSA keys in certificates to <= 8192 bitsgopherbot commentedon Aug 1, 2023
Change https://go.dev/cl/514900 mentions this issue:
[release-branch.go1.20] crypto/tls: restrict RSA keys in certificates to <= 8192 bits[release-branch.go1.20] crypto/tls: restrict RSA keys in certificates…
[release-branch.go1.19] crypto/tls: restrict RSA keys in certificates…
gopherbot commentedon Aug 1, 2023
Change https://go.dev/cl/515056 mentions this issue:
[release-branch.go1.21] crypto/tls: restrict RSA keys in certificates to <= 8192 bitsgopherbot commentedon Aug 1, 2023
Closed by merging a51957f to release-branch.go1.21.
[release-branch.go1.21] crypto/tls: restrict RSA keys in certificates…
dmitshur commentedon Aug 2, 2023
This is fixed on release-branch.go1.21, but still needs to be fixed on the main branch for Go 1.22. Reopening for that.
(CL 515056 said "Updates #61460", not "Fixes #61460", but this got closed ahead of time due anyway due to #29599.)
16 remaining items
geofffranks commentedon Aug 3, 2023
My point is that golang has allowed users to customize via code which ciphers and TLS versions to use (including less secure options to a point). It has allowed users to customers to customize via code timeouts and maximum request sizes. Why was this any different?
FiloSottile commentedon Aug 3, 2023
Some things in crypto/tls are configurable for legacy or compatibility reasons, but conversely there are a number of things that are not configurable in crypto/tls. In particular, we don't support testing and research use cases through the public API, encouraging instead forks like uTLS, zcrypto/ztls, and BoGo.
To put the "extreme paranoia" angle in perspective, the NSA Commercial National Security Algorithm Suite requires 3072-bit keys all the way to Top Secret. The WebPKI root CAs have 4096-bit keys. Using keys larger than 8192 bits has no security justification, even in "extreme paranoia" threat models.
Astaoth commentedon Aug 22, 2023
Hi,
I would like to underline that 16k TLS keys is the standard upper limit in most OS for at least a decade. By making an arbitrary hardcoded limit to 8k keys breaks the standard compatibility. This should be a parameter and not hardcoded.
Also, limiting the RSA key size is a weird way to fix this issue. It's like "your car AC sometime leaks ? Well I'll fix this by removing the AC of all the cars of the same brand. Now there is no AC leak anymore, but you can't have fresh air when it's warm outside.". It's not a fix at all, it's limiting/removing a functionality because for a large minority of users, sometime, it takes a "long time" (whatever this means) to check the RSA key.
On a side note, qualifying 16k RSA keys of "extreme paranoia" is kind of condescendant with the users using them : you don't know the use cases, you can't make any kind of judgement.
Kind regards
mateusz834 commentedon Aug 22, 2023
@Astaoth #61965
Astaoth commentedon Aug 22, 2023
That's not really an answer. What you suggest can be done only at the building time and not at the execution time.
Astaoth commentedon Aug 31, 2023
@mateusz834 @rolandshoemaker
Well, as this issue isn't really fixed but only hidden, out of curiosity, how will you react when the same issue will be reported to you with RSA 8k keys and light servers ? Will you rull out RSA 8k keys as well and states that you don't support light hardware ?
And next, when the same issue will be reported to you with IOT devices and RSA 4k keys, will you state that you don't support IOT devices and you will drop RSA support as well ?
The way this issue is fixed is ridiculous and against good developpement and security pratices.
heschi commentedon Aug 31, 2023
@Astaoth Please follow the Code of Conduct.
For the record, you're incorrect: GODEBUGs can be applied at runtime.
Astaoth commentedon Aug 31, 2023
Hi @heschi,
Thank you for the information about the GODEBUG.
Apologies but I fail to see how I've broken the code of conduct. The questions about 8k keys and IOT seem to be legitimate ones and their answers would allow me a better understanding of the GO team philosophy, especially about the security vision.
ianlancetaylor commentedon Aug 31, 2023
@Astaoth The code of conduct asks people to be charitable and respectful. There are ways to ask questions about Go development choices that do not predict what the response will be, and do not refer to what people are doing as ridiculous. Thanks.
Astaoth commentedon Aug 31, 2023
@ianlancetaylor That's interresting : in this case how would judging people and organizations in a condescending manner without knowing the context or judging the people intents respect the Code of Conduct ? Or unwelcoming 15 char messages ?
Also may I underline that I would haven't made any more noise than necessary here if an appropriate answer would have been provided in first place ?
ianlancetaylor commentedon Aug 31, 2023
I apologize on behalf of other open source contributors for making you feel condescended to or unwelcome. That is not a pleasant feeling, and I'm sorry that it happened. My only defense is that I'm sure it was not intended. The principle of charity applies here in particular: please assume that people responding to you have good intentions.
Nobody is asking you to not make noise. We are asking you to make noise respectfully and charitably.
Finally, note that this is not a support forum; for appropriate forums for questions about using Go please see https://go.dev/wiki/Questions.
crypto/tls: restrict RSA keys in certificates to <= 8192 bits
gopherbot commentedon Feb 10, 2024
Change https://go.dev/cl/563136 mentions this issue:
crypto/x509: document that Verify does not restrict key sizes