cloudflare / cloudflare/quiche
Transport parameters with zero-length integer values accepted (RFC 9000 §18.2)
- Dominant language
- Rust
- Stars
- 11.8k
- Forks
- 1.1k
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 16
Description
quiche accepts QUIC transport parameters with zero-length values for integer fields (e.g. `max_idle_timeout`, `max_ack_delay`). The empty value buffer gets interpreted as varint 0 via the FFI bridge.
RFC 9000 §18.2 requires integer transport parameters to carry a varint value. A zero-byte encoding is not a valid varint.
**Example:** `0100` (max_idle_timeout with length 0) — quiche treats this as max_idle_timeout=0.
ngtcp2 and lsquic both reject with TRANSPORT_PARAMETER_ERROR.
**Comparison:**
| Seed | ngtcp2 | lsquic | quiche |
|------|--------|--------|--------|
| max_idle_timeout empty `0100` | REJECT | REJECT | **ACCEPT** |
| max_ack_delay empty `0b00` | REJECT | REJECT | **ACCEPT** |
| Legal zero `010100` | ACCEPT | ACCEPT | ACCEPT |
Root cause is in `quiche/src/transport_params.rs` — `val.get_varint()` on an empty value buffer is treated as 0 instead of an error.
**Fix:** Reject integer TPs when decoded value length is 0 before calling varint parse.
Found through differential fuzzing (PathDiff v23), also filed with picoquic.
Contributor guide
Research direction
Start in quiche/src/transport_params.rs at the val.get_varint() call used for integer transport parameters. Check the decoding path for the empty values in max_idle_timeout and max_ack_delay, then verify that those encodings are rejected while the legal zero encoding 010100 remains accepted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 84/100