Add M10.2b bounded QUIC channels with exact CA pinning
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 1m47s
Foundation / checks (network) (push) Successful in 8m11s
Foundation / checks (client) (push) Successful in 12m20s
Foundation / checks (tsan) (push) Successful in 7m44s
Foundation / checks (checks) (push) Successful in 31m12s
Foundation / checks (postgres) (push) Successful in 33m27s
Foundation / image (push) Successful in 2m14s
Foundation / postgres-tools (push) Successful in 6m24s
Foundation / server-image (push) Successful in 18m6s

evo_network_quic wraps msquic in a single-owner Endpoint: newest-wins datagram
channel and one length-framed reliable stream, both bounded, with explicit close
causes. The client pins exactly one CA and name with an owned Mbed TLS check that
is the sole authority (OpenSSL's verdict advisory), callbacks never call msquic
under the lock, and MinimumMtu starts at 1280 so 1,200-byte datagrams fit minimum
paths. An owned seeded UDP impairment relay drives loss, duplication, reordering,
corruption, MTU and outage tests, passing on MSVC, GCC and Clang ASan/UBSan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-03 16:11:59 -04:00
co-authored by Claude Opus 5.5
parent 3c421cd0cf
commit ca762bff75
12 changed files with 1844 additions and 6 deletions
+28
View File
@@ -92,3 +92,31 @@ When the client adopts QUIC, the Windows package (ADR-0086) adds `msquic.dll` to
allowlist and the msquic (MIT) and OpenSSL (Apache-2.0) notices. OpenSSL and msquic
security releases update the pin, checksums and this ADR. UDP-blocked networks are
served only by the dev fallback for now.
## M10.2b implementation (2026-10-03)
`evo_network_quic` (`include/evo/network/quic_transport.hpp`) provides one `Endpoint`
(server or client) owned by one thread that calls `poll()`:
- **Channels:** realtime DATAGRAMs (payload <= min(1,200, the peer's current maximum);
inbound newest-wins per connection, outbound in-flight cap refuses) and one
client-opened bidirectional stream carrying 32-bit length-framed messages (<= 64 KiB,
once, in order). Outbound reliable bytes not yet completed and inbound bytes awaiting
`poll()` are bounded; inbound overflow closes the connection (`overloaded`), an
oversized or malformed frame closes it (`protocol`), a second peer stream is refused.
Closures carry a cause: local, peer, idle, untrusted, overloaded, protocol, transport.
- **Exact pinning closes the 10.2a gap:** the client defers OpenSSL's verdict, receives the
peer leaf as DER and returns pending; `poll()` verifies it with Mbed TLS against only
the configured CA and name and completes validation. The owned check is the sole
authority; OpenSSL's verdict is advisory (counted when it disagrees). Reason: dev CAs
share a subject name, so with another CA in `SSL_CERT_FILE` OpenSSL's issuer lookup
failed a genuine server; the environment must neither add nor remove trust.
- **Threading rule:** callbacks touch state only under one mutex and never call msquic
while holding it (msquic may run callbacks inline); handles are closed only by the
owning thread. Mbed TLS runs only on the owning thread.
- **Path MTU:** msquic assumes a 1,288-byte IP MTU by default (1,260-byte IPv4 UDP
payloads), which a compliant 1,280-byte path drops. `MinimumMtu` is set to 1,280; path
discovery only probes upward, and the 1,200-byte datagram budget fits that path.
- **Settings:** idle 5 s, keep-alive 1 s, handshake 5 s, flow-control windows equal to the
inbound reliable bound, one peer bidirectional stream, no unidirectional streams.
- **Impairment relay** (`tools/network/impair`, tests and measurements only): seeded
loss, duplication, reordering, corruption, delay/jitter, payload-size limit and live
reconfiguration (outage).