Full-Scope Review 2026-06-09
Findings ledger for the full-scope review cycle completed at
2026-06-09 19:01 UTC. Eight
independent subsystem reviews covered the tree at commit 50e8eaba
(2026-06-09) against the previous review base bb776326e (2026-05-23). Each
open finding below is remediated through a task record under docs/tasks/
whose source points here; severities are carried into task priority.
Documentation-status findings (stale status wording, landed-behavior drift)
were remediated directly in commit 3ac860dc and are not re-listed.
Scopes Reviewed
- Storage on-disk formats and mount validation (kernel storage caps,
tools/mkstore-image). - Storage services and installable-system flow (init generation/rollback,
storage-persist-service, NVMe-backedBlockDevice). - Kernel core and x86_64 architecture (fault handlers, TLB shootdown, ELF spawn, percpu/SMP/paging/IOAPIC/ISO reader).
- Device Driver Foundation authority (MMIO bounds, DMA-buffer release invariants, device-manager proof gating).
- Remote-session Web UI and network-facing services.
- Schema, generated bindings, and System Manual.
- Userspace runtime and POSIX adapter (
capos-rt,libcapos-posix). - Fuzzing, host-test harnesses, tooling, and CI workflows.
Findings By Scope
1. Storage on-disk formats and mount validation
- High —
kernel/src/cap/persistent_store.rs:parse_disk_store,kernel/src/cap/writable_fs.rs:mount_volume: live extents are validated only against the data region, not againstnext_free_sectoror each other. A crafted or torn image with a live extent in the bump-allocator free region mounts cleanly and is silently overwritten by the nextput_blob/persist_file;compact_reclaim’s shadow-generation copy into the data-region tail clobbers such extents mid-copy; overlapping live extents are accepted. - Low —
writable_fs.rs:mount_volume(alsoreadonly_fs,persistent_store): duplicate sibling names are silently collapsed byBTreeMapinsert instead of failing the mount. - Low —
tools/mkstore-image:write_caposwf1_dir_node/write_caposwf1_file_node: name-length assertion usesWF_NODE_RECORD_BYTES - WF_NODE_OFF_NAME(104) instead of the kernel’sMAX_DISK_NAME_BYTES(88). - Medium —
persistent_store.rs:DiskStoreCap::get_blob: returns disk bytes trusting the entry table without re-verifyingcontent_hash(bytes) == key; init fetches generation objects by hash from this store, so a disk-level edit swaps active system-config content undetected.
2. Storage services and installable-system flow
- Medium —
demos/storage-persist-service/src/bin/server.rs:commit: overwrites the single payload region in place before the superblock write; a crash mid-payload-write destroys the previously committed snapshot and wedges startup. The doc comment overclaims torn-write safety; this service is the named production storage route. - Medium —
init/src/main.rs:read_candidate_pointer/decide_boot_generation: a corrupt or truncatedgen-candidatemarker parses toErrand fails boot closed (the CREATE|TRUNCATE marker rewrite persists a durable size-0 window), contradicting the “a bad generation can never permanently brick the system” guarantee. - Medium —
kernel/src/cap/block_device.rs:NVME_ARBITRARY_NAMESPACE_BLOCKS: hardcodes the 16 MiB QEMU fixture geometry (32768 blocks) on the always-built NVMe arm;BlockDevice.infoand the filesystem/storeBlockSource::inforepeat it, so larger real namespaces are unreachable.kernel/src/nvme_storage_backend.rs“production” wording omits the bounded sync-io seam (64 ops/boot, wedges on CQ wrap).
3. Kernel core and x86_64 architecture
- High —
kernel/src/arch/x86_64/idt.rs:page_fault_handler/gp_fault_handler/invalid_opcode_handler: CPL3 faults halt the whole machine; the “no task abstraction yet” rationale is stale now thatsched::exit_current_threadand process exit cleanup exist. Any userspace null deref is a full-system denial of service. - Medium —
kernel/src/arch/x86_64/tlb.rs:kernel_tlb_shootdown_all: the remote ack uses a CR3-reload flush, which under CR4.PGE does not evict GLOBAL entries — the very kernel upper-half/MMIO mappings it exists for. Safe for the sole current caller (fresh non-present→present installs), buttlb.rsandmem/paging.rsadvertise unmap/revoke reuse. - Medium —
kernel/src/spawn.rsPT_LOAD mapping:PF_W|PF_Xsegments map PRESENT|USER|WRITABLE without NX;capos_lib::elfdoes not reject W+X. - Low (bundle) —
percpu.rs:current_cpu_idunwrap_or(0)masquerades unknown LAPIC ids as the BSP;smp.rsAP_CPUSspin-mutex IF constraint undocumented;mem/paging.rs:map_kernel_physical_rangepartial failure leaks installed PTEs and the VA window;ioapic.rs:write_destinationrestores mask from the cached record, not hardware;mem/validate.rslegacyvalidate_user_bufferis dead code;kernel/src/iso/mod.rsISO_BOOT_SOURCEmutex held across a full polled-PIO ELF transfer;capos-rt/src/panic.rsemergency console write can race a live SQ producer.
4. Device Driver Foundation authority
- Medium —
kernel/src/virtio_transport.rs:MmioRegion: volatile accessor bounds aredebug_assert!-only and the kernel ships release, so the documented “range-checks before reaching device MMIO” contract is false in shipped builds; some regions claim the full BAR length while only aMAPPED_COMMON_CFG_LIMITprefix is mapped. - Medium —
kernel/src/device_manager/stub.rs:detach_dmabuffer_record_for_cap_release_with_reason: the pinned-enabled-vring refusal, RX-DMA quarantine, and autonomous-MSI-X/NVMe handoff blocks live in per-proofcfgislands, while the invariant — never free a frame the device may still master — is production DMA-lifetime behavior.
5. Remote-session Web UI
- Medium —
demos/remote-session-web-ui/src/main.rs:do_login: no login rate limiting and noaccepted.peer_addrcheck; loopback-only is enforced solely by topology plus forgeable Host/Origin headers, weaker than the host bridge sibling./api/probe/expireand/api/probe/stale-callproof seams ship unconditionally in the production-named binary.
6. Schema, generated bindings, and System Manual
- Medium —
schema/capos.capnpSymmetricKey..CertVerifierblock uses leading-style doc comments; capnp attaches docs to the preceding declaration, so every comment shifts one method in the checked-in bindings and the System Manual ships misattributed descriptions. Themanualccoverage gate is interface-level only, so it passes.
7. Userspace runtime and POSIX adapter
- Medium —
capos-rt/src/ring.rs:pack_copy_transfers: computesparams_offsetfrom theVec’sas_ptrbeforeinto_boxed_slicemay realloc, invalidating the computed alignment; currently saved only by undocumented allocator behavior, and the existing alignment test passes vacuously under the 16-aligned host allocator. - Medium (bundle) —
libcapos-posix:dup/dup2/F_DUPFDsnapshotposper slot instead of sharing the open-file-description offset (src/fd.rs);poll/selectignore the timeout entirely so infinite timeout returns 0 and callers busy-spin (src/poll.rs);errno::clear()on shim entry violates C11 §7.5;F_SETFLaccepts-and-ignoresO_NONBLOCKthenreadblocks forever. No#[cfg(test)]host unit tests exist in the crate.
8. Fuzzing, harnesses, tooling, and CI
- Medium —
fuzz/fuzz_targets/manifest_capnp.rsfuzzes a 4096-word/16-deep envelope while productiondefault_reader_optionsallows 64 Mi words and nesting 32; the ISO 9660 record/PVD parser, the CAPOSRO1/CAPOSST1/CAPOSWF1 mount parsers, thecapos-tlsDER validity walk (capos-tls/src/cert.rs:parse_validity), andstorage-persist-service:deserialize_state/parse_superblockhave no fuzz or host coverage. - Low (bundle) — CI Miri step soft-skips when the component is missing
(
.github/workflows/ci.yml);publish-crates.ymlcargo publish --no-verifyis uncommented; thesqe_validationfuzzPARK_BENCHarm is permanently reject-only without a measure-feature fuzz build;capos-wasm/src/wasi/fs.rs:install_preopendiscards itstry_reserve_exactresult.
Spawned Task Records
All records carry source: docs/backlog/full-scope-review-2026-06-09.md:
review-storage-mount-extent-placement-validation(high)review-storage-store-get-hash-verificationreview-storage-persist-service-crash-safe-commitreview-installable-torn-candidate-fallbackreview-storage-nvme-identify-geometryreview-kernel-user-fault-containment(high)review-kernel-tlb-global-shootdown-ackreview-spawn-wx-segment-rejectionreview-ddf-mmio-region-release-boundsreview-ddf-dmabuffer-detach-invariant-hoistreview-webui-inguest-login-hardeningreview-schema-crypto-doc-attributionreview-fuzz-parser-coveragereview-capos-rt-transfer-pack-alignmentreview-posix-fd-semanticsreview-kernel-arch-hardening-lows(low bundle)review-tooling-ci-lows(low bundle)