Kani installation admission
The foundation review found that
ordinary Kani runs checked version strings without authenticating the installed
backend/model closure. The source baseline here is factory f3591f3a and SDK
409a7176096c06c2dd9b7e491e8dc630951e83b4. Product source is unchanged.
Content boundary
The read-only helper executes no tool and performs
no installation. Its capture(temp) validates four input groups:
- The compressed Kani release is SHA-256 authenticated against
kani.toml. Those exact authenticated bytes supply the complete expected archive tree. All 120 installed Kani-owned files, including driver/compiler, CBMC/goto tools, libraries and model sources, must match path, type, executable bit, length and content, except the single exact CBMC replacement below. Extra, deleted or symbolic-link replacements fail. Each executable must also have its owner-execute bit and effective-user execute access. The canonical boolean-executable digest stays unchanged for valid files; group/other-only execute bits cannot hide a PATH fallback. - Schema-two closure pins authorize only
bin/cbmc, with its exact size/hash, upstream source commit and trackedcbmc-nested-offset.patchhash. The patch must be a regular file and is included in every caller's tool-input closure. All other release entries remain byte-for-byte identical to the authenticated archive. Reverting to the archive's backend, an arbitrary replacement/path, an unreviewed patch or a missing pin fails. The identity records both base and installed release hashes plus old/new backend and source-patch identities. The representation investigation explains the triggering mixed byte-header/typed-heap nested-offset discrepancy: the speculative simplification chose an incorrect inner-array origin. The reviewed correction removes both constant-plus-variable shortcuts and retains byte-extract fallback. Paired native/true/false controls qualify that scoped repair; content pins alone do not establish backend or Rust memory-model soundness. - The native Rust installation is checked against a small authored content pin:
all
bin/libexecfiles, top-level compiler/LLVM libraries and the complete native target's library/linker trees. This is 85 files in the reviewed installation. Rust docs and unrelated targets are excluded; another target requires its own reviewed scope and pin. - Both bootstrap launchers are checked by a separate authored content pin.
The native/launcher pins identify previously
provisioned bytes, including local Nix ELF-loader patches. They are explicit
bootstrap trust anchors; the helper does not claim to reproduce Rust from source
or authenticate that native installation against an upstream distribution.
Apart from that one reviewed backend, Kani-owned release files match the
authenticated published archive without normalization. Matching version strings
never substitute for these content checks. The current source selects only
kani-fixed-home; there is no original-home fallback or environment-selected
replacement. The integration owner provisions that separate immutable tree;
ordinary runners provide no setup/install command. Historical qualification
below used the original archive backend at its stated source identities and
does not qualify the corrected installation. It requires fresh qualification.
The actual KANI_HOME passed to the proxy must contain exactly the selected
version entry, with no extra files, directories or symlink markers. The original
archive stays outside this home. This closes the proxy's interrupted-setup
.tar.gz trigger before invocation. Its canonical home identity is recorded and
rechecked, including when the home or selected release is reached through an
owner-provided alias; checking only the resolved release's parent is insufficient.
The proof Rustup home must be a real private directory, its required nightly
must already exist, and its pin must resolve to the same native installation as
Kani's sysroot link. An absent pin or shared-home symlink fails before invoking
a launcher. This prevents the known accidental implicit-provisioning path.
The child environment also sets RUSTUP_AUTO_INSTALL=0.
verify(identity, temp) rehashes the actual inputs at consumption and requires
the complete typed identity to match. It does not trust a saved receipt or reuse
mtime-based checks. The snapshot also binds the resolved execution locations.
Concurrent hostile replacement-and-restoration during execution is outside this
boundary: tools must remain owner-controlled/read-only between these checks.
Caller integration
All callers must hash kani_install.INPUTS with their other source inputs,
capture before launching and verify again before accepting/consuming results.
Cross-verifier producers retain the identity through consumer qualification.
Root integration commit 3b035cff wires this protocol into the common runner,
specialized runners and equality bridge. Every comparison producer records the
identity, and the consumer rechecks that identity and its actual installed bytes.
The child environment must select pinned RUSTC, CARGO, native-bin PATH and
RUSTUP_TOOLCHAIN, and clear LD_LIBRARY_PATH, LD_PRELOAD and LD_AUDIT
overrides. Otherwise authentic files can coexist with an unpinned executed
compiler/Cargo or dynamic-library override. The helper supplies admission, not
an environment sandbox. Host Python/Rustup/OS behavior, external system/Nix
shared libraries, installation-owner trust and verifier/compiler correctness
remain explicit dependencies. This is not a whole-host closure proof.
Historical checks and qualification
The original seventeen tiny-fixture tests reject same-version backend, model, compiler, sysroot and launcher changes; extra/deleted inputs; interior symlinks; executable mode changes; malformed/duplicate/traversing archive entries; private-home/pin failures; and incomplete or wrongly typed saved identities. One model mutation preserves size and restores its timestamp, proving that metadata freshness alone cannot satisfy admission. No shared installed file is changed by these tests.
python3 verification/tools/kani_install.py
python3 -B tests/verification/run.py discover -p test_kani_install.py
The real installed closure passes admission and rechecking around a fresh
actual-source ceil32 producer and its designated negative control. This took
6.97 seconds including both content scans and compiler startup; it is verifier
overhead, not an SDK instruction measurement. All 152 verification-tool unit
tests pass at this component checkpoint, including the 17 replacement fixtures.
Documentation and research-index checks pass. No installed tool was modified.
The final fresh integration uses the same admission before and after 43 positive native harnesses, their 11 negative controls, all comparison bridge producers and their page-pool consumers. The combined runner suite has 169 passing tests. These are verification costs and checks, not runtime measurements.
Generated probe output stays ignored under verification/tmp/. Normal SDK
builds contain none of this helper, its pins or its tests. There is no production
instruction, layout or Wasm-size change.
Equality handoff repair after final source review
The final review of factory c018e9da12b7da3fd40e4851c5fb9c62e6ca8c40
found a separate source-provenance gap. SDK
409a7176096c06c2dd9b7e491e8dc630951e83b4 remains unchanged. A reproduction
using the real report/diagnostic validators admitted equality producer metadata
with sources: {}, then admitted a changed staged page_pool.rs tail. The old
unit fixture contained that same empty source map. The common native runner
also omitted generated main.rs and metadata from its checks after execution.
These observations do not change the frozen review's source identity.
The native producer record now requires inputs_sha256 and a
staged_sha256 map containing every staged compilation file: main.rs and
page_pool.rs or transient.rs. The common runner captures these before
launching, rechecks regular-file type and content after execution, and checks
factory/clean-SDK identities. The iteration and live-counter producers export
the same record; iteration metadata also receives an execution-time check.
Consumers retain these original bindings instead of resealing files later.
Equality and numeric/bitmap/footprint consumers independently require each suite's complete source inventory, reconstruct both compiled files including the exact include tail, and compare complete metadata against current factory/SDK/tool identities. Empty, partial, extra or malformed source maps fail, even when metadata is rehashed. Metadata and staged files must be nonsymlinked regular files in the private run root. Required digests are typed lowercase 64-digit SHA-256 values; null values cannot bypass report or diagnostic checks. The global-bin consumer uses the complete staged-file map, and the separate partition model retains both staged compilation files in its source-step hashes. Existing source assertion/cover admission and diagnostic rejection stay active.
Synthetic complete reports exercise the actual consumer validators, mocking
only installed-tool authentication. Tamper controls cover metadata edits,
empty/partial inventories, malformed digests, changed tails and main.rs, and
equal-content symlink replacements. Private synthetic launchers additionally
exercise the common runner's before/after checks without running a compiler or
verifier. These tests are source/admission checks, not renewed native proofs.
The repair checkpoint passes all 261 tests with
python3 -B tests/verification/run.py discover -p 'test_*.py', plus the
documentation and research-index checks.
Fresh qualification is still required from the repair source: the seven equality/count producers and their Creusot consumers/controls; numeric, bitmap and iteration producers and imported clients; and global-bin/counter and partition-model runs. All common-runner suites need fresh records before their results can qualify this changed runner. No native/prover run was performed for this repair's source checkpoint, and no old absolute-path receipt is reused.