Skip to content

tls: bootstrap refuses a CCS inside a fragmented ServerHello - #13

Merged
atiernan merged 5 commits into
phase3/tls-bootstrap-prooffrom
phase3/tls-bootstrap-ccs
Oct 27, 2026
Merged

atiernan merged 5 commits into
phase3/tls-bootstrap-prooffrom
phase3/tls-bootstrap-ccs

Conversation

@atiernan

Copy link
Copy Markdown
Member

Stacked on #12. This applies #8's rule to the plaintext bootstrap as well: a compatibility CCS is dropped only at a handshake message boundary, and inside a fragmented ServerHello or HRR it is fatal with unexpected_message.

RFC 8446 §5 ("MUST simply drop it" at any time) and §5.1 (no record interleaved inside a fragmented handshake message) conflict for this case. We take the stricter reading. The new docs/ERRATA.md entry records this and is marked "Reported upstream: not yet". On this path, BoringSSL (Chrome) and NSS (Firefox) also refuse such a CCS.

Commits

  • 57896d7 spec: the Ccs arm of receive in bootstrap_spec.rs, plus a modelling-choice note and the ERRATA entry. It was committed before the implementation (rule 3).
  • dd67840 fix: the Frame::Ccs arm in bootstrap.rs and the matching record_step arm in bootstrap_lemmas.rs. In the tests, the old test expected the drop, so it is replaced, and a new test covers a CCS at a boundary before ServerHello.
  • 923f001 mutation bootstrap-ccs-dropped-mid-message, with certificate lemma lemma_ccs_fatal_mid_message in hello/certificates.rs.

Local results (per module; I re-ran these myself after cleaning the Verus cache)

  • hello::bootstrap 15 verified, 0 errors.
  • hello::bootstrap_lemmas 4 verified, 0 errors.
  • hello::certificates 3 verified, 0 errors.
  • cargo test -p clazel-tls: 86 passed, 0 failed. Strict clippy, cargo fmt --check and cargo xtask check are clean.
  • The mutation certificate was checked by hand: it verifies on the mutant and fails on the real spec. cargo xtask mutate has not been run.

No public contract changed. No full verify has run, and clazel-tls stays at tier 0.

🤖 Generated with Claude Code

atiernan and others added 3 commits October 26, 2026 15:47
…essage

RFC 8446 §5 (drop a CCS "at any time") and §5.1 (no record interleaved in
a fragmented handshake message) conflict for a CCS between ServerHello
fragments. Drop it only at a message boundary, as the connection
dispatcher already does (#8); inside a message it is fatal with
unexpected_message. BoringSSL and NSS also refuse it there. ERRATA entry
added; not reported upstream.

The implementation still drops it, so hello::bootstrap does not verify
against this spec until the next commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RFC 8446 §5.1; see docs/ERRATA.md. The Ccs arm of handle_record and
record_step now drop only at a message boundary, matching bootstrap_spec.
Tests updated; adds the certificate lemma used by the next commit.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
atiernan and others added 2 commits October 26, 2026 18:41
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Point four mutations at the module holding their killing lemma
(hello::certificates, auth::certificates) so they no longer survive.

Retarget alert-closure-any-level (restore warning-only user_canceled),
missing-version-only-sh (now
legacy-server-hello-extensions-without-supported-versions), has-ext-first-only
(re-certified through the legacy ServerHello predicate) and
server-hello-extensions-floor (floor raised to 6; empty extension vector).
New lemmas in hello::certificates and lemma_server_hello.

Remove certificate-context: 8b04e0b deliberately dropped the generic
parser's empty-context check; the initial-authentication rule now lives in
auth::spec::initial_certificate_context_valid, covered by
auth-initial-server-certificate-empty-context.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@atiernan
atiernan marked this pull request as ready for review October 27, 2026 07:12
@atiernan
atiernan merged commit 96baecf into phase3/tls-handover Oct 27, 2026
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant