$ the-wire · showcase
Fast-path receive buffer cleared on stream reset
By RepoJournal · Filed · About Go
golang/net fixes a data race in HTTP/3 by clearing the fast-path receive buffer when a stream is reset.
A commit to golang/net addresses a data race surfaced in an HTTP/3 test: when a stream is reset by the peer, unread stream data is discarded and its underlying memory buffers are returned to a pool for reuse, but the stream's fast-path read buffer was not cleared, leaving a dangling reference to the recycled memory. The fix clears the fast-path read buffer on stream reset, and does the same when a stream is reset via a STO frame.
This tightens memory safety for HTTP/3 connections, eliminating a stale reference that could cause a race condition during concurrent stream operations.
Action items
- → Pull the latest golang/net commit to pick up the stream reset buffer fix golang/net [immediate]
References
- [1] quic: clear fast-path receive buffer on stream reset ↗ golang/net