REALITY.5 follow-up cleanups (MessageTooLarge/u24_len, pre-write signing-key, partial-record splice, group-29 test) #88
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
femboy/yip!88
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/reality-5-followup-cleanups"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
REALITY.5 follow-up cleanups
Stacked on #87 (REALITY.5d). Base is
feat/reality-5d-wire-server-flight; merge after #87. Clears the non-blocking follow-ups accumulated across the REALITY.5 stack (the ones you asked to fix — this deliberately leaves exact-leaf-length padding out, keeping the natural-leaf decision, and leaves P256/P384 + HelloRetryRequest as its own milestone #84).yip-utls
Error::MessageTooLarge—emit_server_flight's handshake-message u24 length guards were reusing the record-layerhandshake::Error::RecordTooLarge; a dedicated message-framing variant reads clearer.u24_len(usize) -> Result<[u8;3], Error>— extracts theu32::try_from+> 0xFF_FFFFceiling check that was duplicated across the handshake-message / CertificateEntry / certificate_list length prefixes, guarding the real u24 ceiling (not justu32::MAX). Unit-tested at the boundaries (0, 1, mid, exactly0xFF_FFFF, one over).yip-rendezvous — fail-safe + camouflage
tls_front.rs) —SigningKey::from_pkcs8_dernow runs above the ServerHello write, so its (unreachable — the same PKCS#8 already parsed as an rcgen KeyPair) failure splices rather than drops, keeping every fallible step on the pre-write side of the fail-safe boundary.reality_io.rs) —read_first_tls_recordnow enforces theHANDSHAKE_TIMEOUTdeadline itself (per read viatimeout_at, an absolute deadline — slowloris-safe) instead of the caller wrapping it in a cancellingtimeout(). A client that stalls after sending a partial record now yields the consumed bytes asPassthrough→ spliced todest(a real upstream holds a half-sent record and answers), rather than being dropped (a mild timing distinguisher). A zero-byte connection still drops (Empty). New test: partial-then-stall over a real socket, writer held open, asserts the exact consumed prefix is replayed.Tests
set_curves_list("X25519")) forces the captured template tokey_share_group == 29, so the authed path feeds the standalone0x001dshare (not the 4588 tail) intoemit_server_hello; a realverify=onclient must still complete the hand-rolled handshake and verify the 4b binding. Deterministic, independent of which hybrid groups the BoringSSL version supports (the 4588 path is covered by the netns money test).start_reality_front_withgains acert_srcparameter (both existing callers updated).dump_logson the wrong-pbk FAIL branch ofrun-netns-reality-5d.sh(it cat'd the stale good-run log, not the wrong-pbk run's).Deferred (intentionally not here)
Review (sonnet): Approved — all six match intent; the security-sensitive read-timeout change is slowloris-safe (absolute deadline) with a genuine test; no
unsafe/as/bare-#[allow]. 70 yip-utls + 86 yip-rendezvous tests green, clippy clean.