Repository navigation
fix: repair nightly checks and ARM AES key wiping - #513
Conversation
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Use explicit byte discriminants for each AES key enum so all-zero storage has a valid first variant during automatic field drop. Co-Authored-By: GPT-6.1 Sol <noreply@openai.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 59 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.
Important
Two must-address findings inline: the prove check is red on this PR — the agreement refactor outdates the Rust quoted in proofs/Rind/X86_64/Dispatch.lean and proofs/Rind/Aarch64/P256Dispatch.lean — and four pinned exclude_re lines in .cargo/mutants.toml went stale where the new #[repr(u8)] lines shifted aarch64/aes.rs and x86_64/aes.rs.
Reviewed changes
- ARM AES key wiping:
low/arm/aes.rs'sAesKey/AesDecKeynow wipe the whole enum on drop (zeroise_value+Zeroable), matching the other backends, and every backend's AES key enums — including the portable one nested in ARM's variant 0 — gain#[repr(u8)]so all-bits-zero stays a valid value while drop glue runs on the wiped tag. - Agreement dispatch refactor:
Agreemoves off the mid-layer key types onto high-layer markers (X25519Curve,curve::P256/P384/P521) with an associatedKeytype, so cargo-modules stops attributing high-layer edges to mid-layer receivers. Dispatch, stored-key layout, and wiping are unchanged; the agreement and pkcs1 unit tests and the 12-test zeroing suite pass locally, and the armv7 and aarch64 backends cross-compile clean. - Nightly repairs: a minimal
.#dudectdevShell splits dudect from.#timing's Marvin fetches;admin/ctgrindexcludesrind-python, whose forced--libtest binary would need libpython; the Dart hook test treats a set-but-emptyRIND_DART_CROSS_TARGETSas no targets; the OAEP test declassifies the decoded plaintext only at the assertion; andvartime_planted.rs— compiled only underadmin/ct-vartime's--cfg rind_vartime_planted— is excluded from cargo-mutants. - Formatting: pinned-nightly rustfmt import reordering in
rind-aws-lc-rsandlow/portable/poly1305.rs, and a doc wrap inlow/cpu.rs.
glm-5.3 | 𝕏
Retarget Charon extraction to the high-layer Agree implementations and mirror the associated key type in dispatch models and theorem references. Preserve source quote guards, opacity boundaries, and theorem hypotheses. Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Apply the review-requested line shifts after adding explicit AES enum tags. Keep the exact-line exclusions so neighboring killable mutants remain enabled. Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
|
quest land watch: the merge queue removed this pull request at 07a514e because it conflicts with The land fixer works on it in the background, and the watcher re-enqueues it at the back of the queue once it is fixed or judged flaky, or hands it back here with what it needs. (written by quest land watch) |
|
codex, gpt-6.1-sol, medium effort land fixer note:
(written by codex, gpt-6.1-sol, medium effort) |
|
codex, gpt-6.1-sol, medium effort land fixer: CONFLICT (content): Merge conflict in rind-aws-lc-rs/src/rsa.rs Auto-merging rind-aws-lc-rs/tests/keys.rs Automatic merge failed; fix conflicts and then commit the result. (written by codex, gpt-6.1-sol, medium effort) |
# Conflicts: # rind-aws-lc-rs/src/rsa.rs
Resolve conflicts against main's agreement::PrivateKey public-key split (#529) and dispatch model: keep the curve markers with Self::Key on main's (key, public) signatures, and rename the hand models and proofs to match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LLVM renames a local function another codegen unit calls, so a change that moves items between units made admin/prove-bytes mark imported routines absent and the inventory stale. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Problem
Scheduled build, lint, ctgrind, mutation, and timing jobs failed on main. Most failures were test setup or instrumentation; ARM's AES enum also left its unused storage unwiped under
wipe.Approach
admin/prove's symbol index without LLVM's.llvm.<hash>suffix, so a codegen-unit reshuffle cannot make an imported routine look absent to the bytes check.Impact
wipe, ARM AES wrappers clear their entire storage, including the inactive enum tail. Withoutwipe, wiping remains disabled.Validation
quest gate nix develop --command just ci: passes, including 718 tests, 12 rind wipe tests, 6 adapter wipe tests, doc tests, builds and Clippy, and the 26-test Dart suite.Reproduced the ARMv7 zeroing failure at byte 244; all 12 zeroing tests pass on both QEMU crypto-extension and no-NEON paths, including a rerun with the final explicit enum tags.
Reproduced the OAEP ctgrind error and Python cross-link failure. Both OAEP tests and all 71 adapter tests now report zero ctgrind errors.
Reproduced Dart's line-66 pattern failure with the original empty-variable test. The fixed full suite passes all 26 tests with an empty variable; hook tests with an unset variable and the analyzer pass.
The exact pinned
nightly-2025-02-14formatter passes for the drift files, agreement refactor, and all four AES backends.The original mutation configuration lists the planted fixtures; the fixed configuration excludes them. A two-backend listing audit restores exactly four displaced AES exclusions and confirms neighboring arithmetic and key-drop mutants remain enabled.
Quiet Core 2-path HMAC-SHA256 signing passed over 20.86M measurements, t = -0.83; the planted leak was detected. The original runner's t = -13.50 was not reproduced, and this host has a different microarchitecture.
Both exact archive URLs that returned HTTP 504 now return HTTP 200; the complete Marvin shell realizes successfully.
Reproduced 16 spurious mid-to-high edges; the unchanged
admin/structurenow reports zero source and graph errors. All 13 agreement tests and the ECDH wipe test pass.Full
quest gate nix develop .#prove --command admin/prove: passes all 2,475 build jobs, including both architecture models and the axiom audits. This fixes the PR-only failure from stale agreement dispatch quotes and extraction roots; source guards, opacity boundaries, and theorem hypotheses remain intact.On head 07a514e, the GitHub prove job fails before
admin/provestarts: the pinned Aeneas archive download returns HTTP 504. The exact URL also returns 504 locally. Main uses the same unchanged URL and hash, and GitHub release metadata confirms the pinned digest. This external download failure is separate from the fixed source/model regression; no retry, dependency, or proof-coverage workaround was added.Synthetic fixtures confirm allowed layering passes and a root type alias from mid to high is rejected. A root-reexported high trait implemented in mid with no high types in its associated signatures remains invisible to the existing checker; this change does not rely on that form.
Merged
mainat 9a47bbc into d49afe5 after the merge queue dropped the PR on conflicts.agreement.rskeeps the merge-base design from moq-dev/rind#529:PrivateKeystores its public key, andAgree::loadreturns(key, public). The curve markers andSelf::Keyare layered on top. The hand models (Dispatch.lean,TypesExternal.lean,FunsExternal.lean,X25519.lean,P256.lean) take main's versions with this PR's renames to<marker>.Insts.RindHighAgreementAgreePrivateKeyandKeyed K Key.Dispatch.lean's quote follows the merged Rust. The Dart cross-target fix sits on main's_testTargetloop..cargo/mutants.tomlkeeps main's quest path, and its AES line pins are re-derived on the merged sources (same as before). Aeneas output (Types.lean,Funs.lean) is generated byadmin/proveand not committed.Merged
mainagain at b44efb6, which includes moq-dev/rind#571. The merge was clean.Main's new
admin/prove bytesstep (moq-dev/rind#551) then failed with a staleALGORITHMS.mdinventory: five imported routines looked absent (x86_64edwards25519_decode,mlkem_tomont,mlkem_mulcache_compute; aarch64bignum_modsub,p256_scalarmulbase_alt). They are all#[inline(never)]and present. Their symbols carry LLVM's.llvm.<hash>suffix, which LLVM gives a local function another codegen unit calls, andrind_indexmatched demangled names exactly. This PR's code changes moved items between codegen units. Main alone passesadmin/prove byteslocally at b44efb6.rind_indexnow drops that suffix from the demangled column, whichrind_symboland the absent check both read; the mangled symbol stays for the assembly and objdump lookups. After the fix, the absent set matches main's (onlybignum_modaddon both targets), and all five routines are byte-checked.On 955c156:
quest gate nix develop --command just ci,cargo build --release --locked, and the fullquest gate nix develop .#prove --command admin/provepass, the last with all 2,476 Lean jobs, the bytes check, and HOL Light.quest check --base origin/mainwith the dev shell's quest passes, 149 documents. quest 0.2.0's newercheckflags epicRequiredentries across main's quest tree; this PR touches no quest files.Alternatives
Keep the layering checker intact instead of filtering function dependencies, and keep the timing signal intact instead of changing the detector after an unreproduced observation.
Follow-ups
None proposed. The original HMAC timing observation remains disclosed above; a passing local measurement does not establish absence of leakage on the original runner.
Caused by
.llvm.<hash>suffix, so a change that reshuffles codegen units marks imported routines absent.Review
Rewritten by
quest reviewafter each round.01a1c64d-9b43-7a00-94ab-bbc63368456b, round 2The review found no actionable defects in the new change; builds and tests were not run as instructed.Models
Size: M
Implementer: Codex, gpt-6.1-sol, xhigh effort
Implementer: Codex, gpt-6.1-sol, xhigh effort
Implementer: Codex, gpt-6.1-sol, xhigh effort
Implementer: Codex, gpt-6.1-sol, xhigh effort
Implementer: Claude Code, claude-opus-5-5, medium effort (iterate, M)
Implementer: Claude Code, claude-opus-5-5, medium effort (iterate, M)
(Written by GPT-6.1 Sol with xhigh)
(Merge update written by Claude Opus 5.5 with medium)
(Second merge and prove-bytes fix written by Claude Opus 5.5 with medium)