Skip to content

Commit 29bc14e

Browse files
tatianabgopherbot
authored andcommitted
data/reports: add GO-2025-3408
- data/reports/GO-2025-3408.yaml Fixes #3408 Change-Id: Icb5a11ccbb088475ea20429562c2ce6493ade4db Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/645138 Reviewed-by: Damien Neil <[email protected]> Auto-Submit: Tatiana Bradley <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent 08f71b7 commit 29bc14e

File tree

2 files changed

+108
-0
lines changed

2 files changed

+108
-0
lines changed

data/osv/GO-2025-3408.json

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"schema_version": "1.3.1",
3+
"id": "GO-2025-3408",
4+
"modified": "0001-01-01T00:00:00Z",
5+
"published": "0001-01-01T00:00:00Z",
6+
"summary": "DefaultConfig has dangerous defaults causing hung Read in github.com/hashicorp/yamux",
7+
"details": "The default values for Session.config.KeepAliveInterval and Session.config.ConnectionWriteTimeout of 30s and 10s create the possibility for timed out writes that most aren't handling in their readers.\n\nCalls to Stream.Read on one side of a connection will hang until the underlying Session is closed if the corresponding Stream.Write call on the other side it's waiting for returns with ErrConnectionWriteTimeout. This happens in the case of network congestion between the two sides.\n\nIf you keep Session.sendCh full (fixed capacity of 64) for ConnectionWriteTimeout, but for less than the KeepAliveInterval + ConnectionWriteTimeout (which would kill the Session), Stream.Write will return ErrConnectionWriteTimeout. The state of the underlying Session or Stream is not modified. When this happens, the other side's Stream.Read call that's waiting for that write will never return because there's no timeout for this edge-case.\n\nSince no keep alive timed out, you can continue to use the Session once the network congestion is resolved, but that Stream.Read call will only return when the Session closes or the response shows up. Since the write call on the other side timed out the call to Stream.Read will never return.\n\nAny conditions that cause network writes to stall for 10-30 seconds can trigger this Denial of Service- extremely high CPU contention on either side of the connection, BGP reconvergence, etc. To resolve the Denial of Service issue, you have to re-establish the connections, which will usually require a hard restart of the service on either end of the connection.",
8+
"affected": [
9+
{
10+
"package": {
11+
"name": "github.com/hashicorp/yamux",
12+
"ecosystem": "Go"
13+
},
14+
"ranges": [
15+
{
16+
"type": "SEMVER",
17+
"events": [
18+
{
19+
"introduced": "0.1.0"
20+
}
21+
]
22+
}
23+
],
24+
"ecosystem_specific": {
25+
"imports": [
26+
{
27+
"path": "github.com/hashicorp/yamux",
28+
"symbols": [
29+
"Client",
30+
"DefaultConfig",
31+
"Server"
32+
]
33+
}
34+
]
35+
}
36+
}
37+
],
38+
"references": [
39+
{
40+
"type": "FIX",
41+
"url": "https://github.com/hashicorp/yamux/pull/143"
42+
},
43+
{
44+
"type": "REPORT",
45+
"url": "https://github.com/hashicorp/yamux/issues/142"
46+
}
47+
],
48+
"credits": [
49+
{
50+
"name": "Logan Attwood"
51+
}
52+
],
53+
"database_specific": {
54+
"url": "https://pkg.go.dev/vuln/GO-2025-3408",
55+
"review_status": "REVIEWED"
56+
}
57+
}

data/reports/GO-2025-3408.yaml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
id: GO-2025-3408
2+
modules:
3+
- module: github.com/hashicorp/yamux
4+
versions:
5+
- introduced: 0.1.0
6+
vulnerable_at: 0.1.2
7+
packages:
8+
- package: github.com/hashicorp/yamux
9+
symbols:
10+
- DefaultConfig
11+
- Server
12+
- Client
13+
summary: |-
14+
DefaultConfig has dangerous defaults causing hung Read in
15+
github.com/hashicorp/yamux
16+
description: |-
17+
The default values for Session.config.KeepAliveInterval and
18+
Session.config.ConnectionWriteTimeout of 30s and 10s create the possibility for
19+
timed out writes that most aren't handling in their readers.
20+
21+
Calls to Stream.Read on one side of a connection will hang until the underlying
22+
Session is closed if the corresponding Stream.Write call on the other side it's
23+
waiting for returns with ErrConnectionWriteTimeout. This happens in the case of
24+
network congestion between the two sides.
25+
26+
If you keep Session.sendCh full (fixed capacity of 64) for
27+
ConnectionWriteTimeout, but for less than the KeepAliveInterval +
28+
ConnectionWriteTimeout (which would kill the Session), Stream.Write will return
29+
ErrConnectionWriteTimeout. The state of the underlying Session or Stream is not
30+
modified. When this happens, the other side's Stream.Read call that's waiting
31+
for that write will never return because there's no timeout for this edge-case.
32+
33+
Since no keep alive timed out, you can continue to use the Session once the
34+
network congestion is resolved, but that Stream.Read call will only return when
35+
the Session closes or the response shows up. Since the write call on the other
36+
side timed out the call to Stream.Read will never return.
37+
38+
Any conditions that cause network writes to stall for 10-30 seconds can trigger
39+
this Denial of Service- extremely high CPU contention on either side of the
40+
connection, BGP reconvergence, etc. To resolve the Denial of Service issue, you
41+
have to re-establish the connections, which will usually require a hard restart
42+
of the service on either end of the connection.
43+
credits:
44+
- Logan Attwood
45+
references:
46+
- fix: https://github.com/hashicorp/yamux/pull/143
47+
- report: https://github.com/hashicorp/yamux/issues/142
48+
source:
49+
id: go-security-team
50+
created: 2025-01-28T17:11:24.888252-05:00
51+
review_status: REVIEWED

0 commit comments

Comments
 (0)