Skip to content

Commit 539543c

Browse files
tatianabgopherbot
authored andcommitted
data/reports: update GO-2024-3321
Add GHSA and extend description to include additional context from the announcement. - data/reports/GO-2024-3321.yaml Updates #3321 Fixes #3328 Change-Id: I14ce706997a2468c27ab3a1c3c8087a14158ffcb Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/635695 LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Tatiana Bradley <[email protected]> Reviewed-by: Zvonimir Pavlinovic <[email protected]>
1 parent f61706e commit 539543c

File tree

3 files changed

+52
-12
lines changed

3 files changed

+52
-12
lines changed

data/cve/v5/GO-2024-3321.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"descriptions": [
1414
{
1515
"lang": "en",
16-
"value": "Applications and libraries which misuse the ServerConfig.PublicKeyCallback callback may be susceptible to an authorization bypass."
16+
"value": "Applications and libraries which misuse the ServerConfig.PublicKeyCallback callback may be susceptible to an authorization bypass. The documentation for ServerConfig.PublicKeyCallback says that \"A call to this function does not guarantee that the key offered is in fact used to authenticate.\" Specifically, the SSH protocol allows clients to inquire about whether a public key is acceptable before proving control of the corresponding private key. PublicKeyCallback may be called with multiple keys, and the order in which the keys were provided cannot be used to infer which key the client successfully authenticated with, if any. Some applications, which store the key(s) passed to PublicKeyCallback (or derived information) and make security relevant determinations based on it once the connection is established, may make incorrect assumptions. For example, an attacker may send public keys A and B, and then authenticate with A. PublicKeyCallback would be called only twice, first with A and then with B. A vulnerable application may then make authorization decisions based on key B for which the attacker does not actually control the private key. Since this API is widely misused, as a partial mitigation golang.org/x/[email protected] enforces the property that, when successfully authenticating via public key, the last key passed to ServerConfig.PublicKeyCallback will be the key used to authenticate the connection. PublicKeyCallback will now be called multiple times with the same key, if necessary. Note that the client may still not control the last key passed to PublicKeyCallback if the connection is then authenticated with a different method, such as PasswordCallback, KeyboardInteractiveCallback, or NoClientAuth. Users should be using the Extensions field of the Permissions return value from the various authentication callbacks to record data associated with the authentication attempt instead of referencing external state. Once the connection is established the state corresponding to the successful authentication attempt can be retrieved via the ServerConn.Permissions field. Note that some third-party libraries misuse the Permissions type by sharing it across authentication attempts; users of third-party libraries should refer to the relevant projects for guidance."
1717
}
1818
],
1919
"affected": [
@@ -50,13 +50,13 @@
5050
],
5151
"references": [
5252
{
53-
"url": "https://go.dev/issue/70779"
53+
"url": "https://github.com/golang/crypto/commit/b4f1988a35dee11ec3e05d6bf3e90b695fbd8909"
5454
},
5555
{
5656
"url": "https://go.dev/cl/635315"
5757
},
5858
{
59-
"url": "https://github.com/golang/crypto/commit/b4f1988a35dee11ec3e05d6bf3e90b695fbd8909"
59+
"url": "https://go.dev/issue/70779"
6060
},
6161
{
6262
"url": "https://groups.google.com/g/golang-announce/c/-nPEi39gI4Q/m/cGVPJCqdAQAJ"

data/osv/GO-2024-3321.json

+7-6
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
"modified": "0001-01-01T00:00:00Z",
55
"published": "0001-01-01T00:00:00Z",
66
"aliases": [
7-
"CVE-2024-45337"
7+
"CVE-2024-45337",
8+
"GHSA-v778-237x-gjrc"
89
],
910
"summary": "Misuse of ServerConfig.PublicKeyCallback may cause authorization bypass in golang.org/x/crypto",
10-
"details": "Applications and libraries which misuse the ServerConfig.PublicKeyCallback callback may be susceptible to an authorization bypass.",
11+
"details": "Applications and libraries which misuse the ServerConfig.PublicKeyCallback callback may be susceptible to an authorization bypass.\n\nThe documentation for ServerConfig.PublicKeyCallback says that \"A call to this function does not guarantee that the key offered is in fact used to authenticate.\" Specifically, the SSH protocol allows clients to inquire about whether a public key is acceptable before proving control of the corresponding private key. PublicKeyCallback may be called with multiple keys, and the order in which the keys were provided cannot be used to infer which key the client successfully authenticated with, if any. Some applications, which store the key(s) passed to PublicKeyCallback (or derived information) and make security relevant determinations based on it once the connection is established, may make incorrect assumptions.\n\nFor example, an attacker may send public keys A and B, and then authenticate with A. PublicKeyCallback would be called only twice, first with A and then with B. A vulnerable application may then make authorization decisions based on key B for which the attacker does not actually control the private key.\n\nSince this API is widely misused, as a partial mitigation golang.org/x/[email protected] enforces the property that, when successfully authenticating via public key, the last key passed to ServerConfig.PublicKeyCallback will be the key used to authenticate the connection. PublicKeyCallback will now be called multiple times with the same key, if necessary. Note that the client may still not control the last key passed to PublicKeyCallback if the connection is then authenticated with a different method, such as PasswordCallback, KeyboardInteractiveCallback, or NoClientAuth.\n\nUsers should be using the Extensions field of the Permissions return value from the various authentication callbacks to record data associated with the authentication attempt instead of referencing external state. Once the connection is established the state corresponding to the successful authentication attempt can be retrieved via the ServerConn.Permissions field. Note that some third-party libraries misuse the Permissions type by sharing it across authentication attempts; users of third-party libraries should refer to the relevant projects for guidance.",
1112
"affected": [
1213
{
1314
"package": {
@@ -41,16 +42,16 @@
4142
],
4243
"references": [
4344
{
44-
"type": "REPORT",
45-
"url": "https://go.dev/issue/70779"
45+
"type": "FIX",
46+
"url": "https://github.com/golang/crypto/commit/b4f1988a35dee11ec3e05d6bf3e90b695fbd8909"
4647
},
4748
{
4849
"type": "FIX",
4950
"url": "https://go.dev/cl/635315"
5051
},
5152
{
52-
"type": "FIX",
53-
"url": "https://github.com/golang/crypto/commit/b4f1988a35dee11ec3e05d6bf3e90b695fbd8909"
53+
"type": "REPORT",
54+
"url": "https://go.dev/issue/70779"
5455
},
5556
{
5657
"type": "WEB",

data/reports/GO-2024-3321.yaml

+42-3
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,58 @@ modules:
88
- package: golang.org/x/crypto/ssh
99
symbols:
1010
- ServerConfig.PublicKeyCallback
11-
summary: Misuse of ServerConfig.PublicKeyCallback may cause authorization bypass in golang.org/x/crypto
11+
summary: |-
12+
Misuse of ServerConfig.PublicKeyCallback may cause authorization bypass in
13+
golang.org/x/crypto
1214
description: |-
1315
Applications and libraries which misuse the ServerConfig.PublicKeyCallback
1416
callback may be susceptible to an authorization bypass.
17+
18+
The documentation for ServerConfig.PublicKeyCallback says that "A call to this
19+
function does not guarantee that the key offered is in fact used to
20+
authenticate." Specifically, the SSH protocol allows clients to inquire about
21+
whether a public key is acceptable before proving control of the corresponding
22+
private key. PublicKeyCallback may be called with multiple keys, and the order
23+
in which the keys were provided cannot be used to infer which key the client
24+
successfully authenticated with, if any. Some applications, which store the
25+
key(s) passed to PublicKeyCallback (or derived information) and make security
26+
relevant determinations based on it once the connection is established, may make
27+
incorrect assumptions.
28+
29+
For example, an attacker may send public keys A and B, and then authenticate
30+
with A. PublicKeyCallback would be called only twice, first with A and then with
31+
B. A vulnerable application may then make authorization decisions based on key B
32+
for which the attacker does not actually control the private key.
33+
34+
Since this API is widely misused, as a partial mitigation
35+
golang.org/x/[email protected] enforces the property that, when successfully
36+
authenticating via public key, the last key passed to
37+
ServerConfig.PublicKeyCallback will be the key used to authenticate the
38+
connection. PublicKeyCallback will now be called multiple times with the same
39+
key, if necessary. Note that the client may still not control the last key
40+
passed to PublicKeyCallback if the connection is then authenticated with a
41+
different method, such as PasswordCallback, KeyboardInteractiveCallback, or
42+
NoClientAuth.
43+
44+
Users should be using the Extensions field of the Permissions return value from
45+
the various authentication callbacks to record data associated with the
46+
authentication attempt instead of referencing external state. Once the
47+
connection is established the state corresponding to the successful
48+
authentication attempt can be retrieved via the ServerConn.Permissions field.
49+
Note that some third-party libraries misuse the Permissions type by sharing it
50+
across authentication attempts; users of third-party libraries should refer to
51+
the relevant projects for guidance.
52+
ghsas:
53+
- GHSA-v778-237x-gjrc
1554
credits:
1655
- Damien Tournoud (Platform.sh / Upsun)
1756
- Patrick Dawkins (Platform.sh / Upsun)
1857
- Vince Parker (Platform.sh / Upsun)
1958
- Jules Duvivier (Platform.sh / Upsun)
2059
references:
21-
- report: https://go.dev/issue/70779
22-
- fix: https://go.dev/cl/635315
2360
- fix: https://github.com/golang/crypto/commit/b4f1988a35dee11ec3e05d6bf3e90b695fbd8909
61+
- fix: https://go.dev/cl/635315
62+
- report: https://go.dev/issue/70779
2463
- web: https://groups.google.com/g/golang-announce/c/-nPEi39gI4Q/m/cGVPJCqdAQAJ
2564
cve_metadata:
2665
id: CVE-2024-45337

0 commit comments

Comments
 (0)