etcd: `tlsListener.acceptLoop` spawns unbounded handshake goroutines with no deadline
etcd-io etcd
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| go.etcd.io/etcd/v3 Go |
|
|
| go.etcd.io/etcd/client/pkg/v3 Go |
etcd-io etcd
| Product | Affected | Fixed in |
|---|---|---|
| go.etcd.io/etcd/v3 Go |
|
|
| go.etcd.io/etcd/client/pkg/v3 Go |
< 3.5.33≥ 3.6.0 · < 3.6.14≥ 3.7.0-alpha.0 · < 3.7.1
|
etcd is a distributed key-value store for the data of a distributed system. Prior to versions 3.5.33, 3.6.14, and 3.7.1, a network attacker who can reach an etcd TLS listener can open many TCP connections and never send a ClientHello. In client/pkg/transport/listener_tls.go, each connection handled by tlsListener.acceptLoop spawns a goroutine that blocks indefinitely inside tls.Conn.Handshake() and remains tracked in the pending map. Unbounded goroutine and map growth can exhaust memory in the etcd process, causing loss of availability for the cluster and, when etcd backs Kubernetes, the control plane. This issue is fixed in versions 3.5.33, 3.6.14, and 3.7.1.
From the CVE record · GitHub_M
The etcd TLS listener can retain a goroutine and a pending-map entry for each connection that never sends a ClientHello. A network attacker who can reach the listener can open many such connections without authentication or user interaction, potentially exhausting memory and disrupting cluster availability.
Operators of etcd and users of Go packages go.etcd.io/etcd/v3 or go.etcd.io/etcd/client/pkg/v3 should check versions before 3.5.33, from 3.6.0 to before 3.6.14, or from 3.7.0-alpha.0 to before 3.7.1.