Repository navigation
Conversation
read_capture() wraps its receive buffer in Capture only after SPI transfer and CRC validation. A bus error after a partial or complete receive, or a checksum mismatch, frees the buffer without running Capture's wiping destructor. Construct the wiping owner before the transfer so every subsequent error return clears initialized receive bytes. Keep successful ownership and the existing allocation and input-validation behavior unchanged. Add a host regression using the production read function and destructor with synthetic SPI and allocation boundaries. All nine cases pass; the unpatched source fails the three receive-error cleanup cases. This is buffer-lifetime hardening; no information disclosure to an unprivileged caller has been demonstrated. Fixes: c1240e7 ("soc: apple: add Apple SEP driver (Touch ID and key sealing)") Assisted-by: LLM [Codex, GPT-6] [Claude Code, claude-opus-5-5] Signed-off-by: Matt <[email protected]>
Register tools/aurora-sep/tests/capture-error-wipe in the SEP source checks. It runs under the job's pinned Rust 1.85.0 toolchain. Assisted-by: LLM [Claude Code, claude-opus-5-5] Signed-off-by: Matt <[email protected]>
|
Review at cd1fae9. Thanks, the fix is right. Building
|
|
Thanks for the review. I've opened #2888 from a fresh branch with the reworded commits. It has the same tree as cd1fae9 and only human trailers in the commits; the assistance note is now the last line of the description. I don't have an M3 Air. My hardware is an M1 (J313), so I can't do the enrol + match on M3. Closing this in favour of #2888. |
read_capture()wraps its receive buffer inCaptureonly after the SPI transfer and the CRC check pass. A bus error after a partial or complete receive, or a checksum mismatch, returns early and frees aKVecholding fingerprint image bytes without runningCapture's wipingDrop. Each read allocates a fresh buffer and callers never see it on error, so this is buffer-lifetime hardening; no disclosure to an unprivileged caller has been demonstrated.Construct the
Captureowner before starting the transfer so itsDropruns on those error paths. The success path returns the same allocation. A resize failure still happens before SPI has received any image bytes, and length validation is unchanged.Port of omacom/linux-aurora#251. The original remains open. Its October 29 approval records an M3 Air smoke test on the original test kernel. Kernel CI subsequently passed on original head
9e899a873, including compile and SEP host tests. Review · CI runChanges
drivers/soc/apple/sensor.rs: 6+/1-, the ownership move described above.tools/aurora-sep/tests/capture-error-wipe/: host regression built from the productionread_capture()andCapture::drop, with synthetic SPI and allocation boundaries..github/workflows/sep-source.yml: runs it in the SEP source checks under the job's pinned Rust 1.85.0.Differences from the original PR
integration/auroraat 110861f with no source conflicts.sep-source.ymlinstead oftools/aurora-ci/host-tests.json, which this tree doesn't have. The original second commit, which only re-pinned that manifest to Rust 1.85.0, is therefore dropped.Validation (local host)
sensor.rsfrom 110861f: exactly the complete-transfer-error, partial-transfer-error and CRC-rejection cases fail because image bytes are freed unwiped. The other six pass.8ced22deb, whose tree is identical to this head (only commit trailers changed since), the arm64 SEP composite objectdrivers/soc/apple/apple-sep.ocompiled and linked locally with SEP KUnit enabled, LLVM 23.1.5, Rust 1.85.0, and the tree's patched bindgen. The pinned base reproduced the compiler warnings. Full kernel and loadable-module builds, KUnit execution, and a hardware run of this exact head remain outstanding.AI-assisted: OpenAI Codex for the original change, Claude Code for the port (see the
Assisted-by:trailers). Commits carry my DCO sign-off.🤖 Generated with Claude Code