Repository navigation
Check rustls provider panic reachability - #572
Conversation
Quest-Claim: 117821ef9d150cf2
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 17 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
There was a problem hiding this comment.
ℹ️ No blocking issues — the evidence in the PR body verifies against the pinned sources, and the quest tree stays consistent. One stale cross-reference worth a one-sentence follow-up.
Reviewed changes
- Quest closure: deletes
quest/m2/confidence/rustls-provider-panics.md, its## Requiredbullet inquest/m2/confidence/README.md, and both cross-reference bullets inadapters-hostile-input.md; a whole-tree grep finds no remaining reference to the deleted quest. - Closure evidence verified against the repo: the three
unwraps are exactly where the body says —aead_keyatrind-rustls/src/aead.rs:12, the TLS 1.2 ChaCha IV at:77, the AES-GCM TLS 1.2 IV at:241— andCargo.lockpins rustls 0.23.46, the version the provenance cites. - Closure evidence verified against rustls 0.23.46 (tag
v/0.23.46):KeyScheduleSuite::set_encrypter/derive_decrypterbuild the key viaderive_traffic_key, which HKDF-expands exactlyaead_alg.key_len()bytes, and the IV viaderive_traffic_iv, a fixed 12-byteIv;make_cipher_pairsplits a PRF key block sized from the provider's ownkey_block_shape()and hands the decrypter exactlyfixed_iv_lenbytes, withextract_keysfed the same split;AeadKey::newispub(crate)(behind thetls12feature) andFrom<[u8; 32]>is the only public constructor, so a peer or a normal provider user cannot influence any length. - Parity decision sound: rustls's own ring provider unwraps in the same places (
UnboundKey::new(...).unwrap()in both providers' encrypters/decrypters, thetry_into().unwrap()in TLS 1.2extract_keys), with the same documented contract — "the caller arranges thatkeyiskey_len()in bytes" — and the trait methods are infallible, so matching upstream rather than adding a fallible path follows the adapter-parity rule inAGENTS.md.
ℹ️ adapters-hostile-input.md still points at the trace this PR deletes
quest/m2/confidence/adapters-hostile-input.md:14 says the 2026-11-09 audit "found no panic a peer can reach, apart from the unwraps the trace under Related owns" — but this PR removes that trace from ## Related, and the trace is now closed with the conclusion that no peer input reaches those unwraps. The sentence both dangles (nothing under Related is the trace anymore) and understates the settled result. One sentence fixes it; the mechanical guard this PR points at is unaffected.
Technical details
# Stale prose reference to the closed panic-reachability trace
## Affected sites
- quest/m2/confidence/adapters-hostile-input.md:14 — "apart from the `unwrap`s the trace under Related owns": the Related bullet for that trace was deleted by this PR, so "the trace" no longer resolves, and the trace's outcome (no peer input reaches the `unwrap`s in `rind-rustls/src/aead.rs`) is settled by this PR's body.
## Required outcome
- The sentence names something a reader can still find: either reference the closed trace by its PR ("the trace in #572, which closed with no reachable panic") or fold the result in ("the `unwrap`s in `rind-rustls/src/aead.rs`, which #572 confirmed no peer input reaches").glm-5.3 | 𝕏
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Closes the quest with evidence: no peer input, and no normal use of the provider, can reach the
unwraps inrind-rustls/src/aead.rs(aead_keyat :12, the TLS 1.2 ChaCha IV at :77, the AES-GCM TLS 1.2 IV at :241). No code changes.Provenance (rustls 0.23.46)
KeyScheduleSuite::set_encrypter/derive_decrypter(src/tls13/key_schedule.rs) build the key withderive_traffic_key(expander, aead_alg), which HKDF-expands exactlyaead_alg.key_len()bytes, and the IV withderive_traffic_iv, a fixed[u8; NONCE_LEN]. rind'skey_len()returns the algorithm's own key length, soaead::Key::newalways gets the right size.make_cipher_pair(src/tls12/mod.rs:157) splits a PRF key block sized from our ownkey_block_shape()(enc_key_len= algorithm key length,fixed_iv_len12 for ChaCha / 4 for GCM, explicit 8 for GCM).decryptergetsfixed_iv_lenbytes, so GCM'siv.try_into()into[u8; 4]and ChaCha's 12-byte IV always fit.extract_keysis fed the same split.Trait contract
AeadKey::newispub(crate)in rustls; outside rustls a key can only be built viaFrom<[u8; 32]>. A direct trait caller handing a 32-byte key to an AES-128encrypter, or a wrong-length IV slice, is outside the contract rustls documents ("the caller arranges thatkeyiskey_len()in bytes"). rustls's own ring provider unwraps in exactly the same places (src/crypto/ring/tls12.rs:127,146,183,193,219,tls13.rs:175,183), and rind-rustls must offer exactly that provider's API and behavior, so returning errors here is impossible (the trait methods are infallible) and panicking on contract violation matches upstream.Decisions made without asking
Public API
None.
Caused by
No defect found.
Models
Size: S
Implementer: Claude Code, Opus 5.5, unknown effort
🤖 Generated with Claude Code
(Written by Opus 5.5)
Review
Rewritten by
quest reviewafter each round.01a1c621-384a-76b3-a4b3-fce694753275, round 1The change only removes a quest document and its references, changes no executable code or tests, and leaves no references to the deleted document.