Sanitization 2.0.2 #29
Closed
eldryoth
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
sanitization 2.0.2
This patch release improves Miri compatibility and strengthens mapped-memory
teardown without changing the public API.
Miri lifecycle coverage
cfg(all(miri, test)), in the core crate's own unit-test build, instead ofexecuting unsupported syscall inline assembly.
and reuse, random-canary ownership, integrity failure, quarantine, rollback,
growth, replacement, and drop.
Miri does not execute or validate real
mmap,mlock, dump/fork policy,CSPRNG, page-protection, or guard-page operations. Simulated successful report
states are test state only; native target evidence remains required. A normal
build with
--cfg miridoes not select the simulator, and a release build thatalso forges
cfg(test)is rejected. Downstream Miri uses portable comparisoncode, while tests that execute native mapped constructors remain unsupported
and should target-gate those paths.
The same condition now protects every production comparison, AArch64
page-size, cache-flush, register-scrub, guard-page, and interop cfg boundary. A
release gate statically rejects Miri protection behavior switches without
test, compiles a normal release library with a manually supplied--cfg miri,and rejects the forged release simulator combination. The release helper also
refuses ambient
RUSTFLAGSandCARGO_ENCODED_RUSTFLAGS; evidence records bothchannels. These checks treat the compiler invocation as trusted.
The full Miri workflow runs all-feature mapped lifecycle coverage as core
library unit tests and runs derive and companion integrations with portable
comparison features. This preserves their interpreter coverage without making
native production dependencies select a simulator.
Teardown hardening
LockedSecretBytes,LockedSecretVec, andSecretPoolnow clear the completemapping immediately before unlock and unmap. This includes mapping padding and
integrity metadata in addition to the secret payload.
SealedSecretBytesno longer unmaps pages when cleanup cannot confirm thatevery page is erased. Cleanup now makes each page writable, erases it, and
reseals it immediately, continuing across other pages after a failure. It
retains the poisoned mapping, any uncertain page, and any established lock for
checked retry;
Dropdeliberately leaves that mapping to process teardownrather than returning uncertain physical pages to the operating system.
Native fault-injection tests cover both ordering directions: a first-page
failure does not prevent later pages from being erased, and a cleanup reseal
failure retains already-erased storage until checked retry succeeds.
Mapped native and
subtleequality traits now fail closed with a false choiceon integrity failure instead of selecting an implicit panic policy. Checked
try_constant_time_eqremains the API for distinguishing canary corruptionfrom ordinary inequality. Miri now compiles and exercises the locked dynamic
and UTF-8 zeroize/subtle interop implementations.
All five workspace crates are released together at
2.0.2, with the derivecrate exact-pinned to the matching runtime version.
The fuzz-only NCSA exception for
libfuzzer-sys 0.4.13is now held in afuzz-specific cargo-deny configuration, avoiding unmatched exceptions in the
runtime and tooling dependency graphs.
This discussion was created from the release Sanitization 2.0.2.
All reactions