Completed QUIC streams remain registered and can OOM-kill the server
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- c
- Domain
- networking
Research direction
Start with the stream insertion and release callback in src/quic.c, then inspect connection cleanup in src/connection.c and how picoquic signals transport release. Reproduce the reported repeated unidirectional stream case and check existing stream lifecycle tests. Done means terminal streams no longer accumulate per connection while late events remain safe.
Written by the indexing model from the issue text.
Description
Summary
Completed peer-created streams remain in imquic_connection.streams after
picoquic releases them. Because stream credit is returned, one remote client
can repeat this indefinitely on one connection until the process is OOM-killed.
Runtime-tested target: unreleased main snapshot
e4e575191396ebd586cfe25d8317cd65a70bc0f9. The relevant source remains
unchanged at be40625bcb08119a351e38d48ceddc4450f71b18.
Required conditions
- The server exposes raw QUIC.
- The client completes one normal handshake and keeps the connection alive.
- It repeatedly opens client-initiated unidirectional streams and sends FIN.
No malformed frame, non-default transport parameter, custom handler, or
connection flood is required.
Root cause
Streams are inserted into the connection map,
but the release callback only drops the mapping reference.
The map is reclaimed only when the parent connection is freed.
Reproduction and result
With a 4 GiB memory+swap limit, one connection sent 25,000,000 acknowledged
empty unidirectional streams. Both fresh victims were OOM-killed with exit
137 in 33.750 and 34.639 seconds; the client sent about 167.7 MB.
Matched controls sent 170 MB through one stream. Both remained healthy,
passed all 22/22 probes, and peaked near 2.13 MiB RSS.
Impact
One remote client can terminate the server process and disconnect all users.
Suggested fix
Remove terminal streams from the connection map after transport release. If
late-event suppression is needed, retain only a bounded tombstone.
- Dominant language
- C
- Stars
- 84
- Forks
- 17
- Avg merge
- 2h 9m
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from meetecho/imquic
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
-
Difficulty 4/5 3-5 days Newbie friendliness 43/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
OpenTenBase/OpenTenBase#557 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
libsdl-org/SDL#16837 ·
Maintainers usually reply within 1 day
-
Claude:NeedsReview GPT:ConfirmedBug GPT:NeedsReview triage
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
open5gs/open5gs#5141 · 2 comments ·
Maintainers usually reply within 1 day
-
CI: MSYS2 jobs fail — mingw python3 package renamed upstream to pythonPossibly taken @ronaldtse claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
bug good first issue
Difficulty 1/5 Under an hour Newbie friendliness 85/100
TanvirHasanAkash/CSE114-Lab-Project-72_B2_G2#37 ·
Maintainers usually reply within 1 day