Repository navigation
soc: apple: sep: Bound xart_guard_pins by board and setup operation - #528
acrogenesis wants to merge 3 commits into
Conversation
Limit pin admission to measured provisioning operations and the first guarded J313 activation. Keep the guard closed between them. Make the keybag intent durable before sending the create and record the committed identity separately from a spent attempt. Report the running pin policy and give a storage refusal precedence over every matching update. Reuse bounded legacy pins without inferring guarded creation. A verified match with saved state can establish usability for that boot. Signed-off-by: Adrian Rangel <adrian@acrogenesis.com>
[High impact] The checksum fix appears safe to merge. SummaryBounds shared-record pins by board and setup step, ties guarded completion to the saved keybag UUID, and adds diagnostics for older installations.
Reviews (3) · Last reviewed commit: "tools: aurora-sep: update Arch safety do..." · Reviewed by Greptile |
Only the complete, empty v2 refusal record means a previous create did not leave a bag. Compare with the record the writer encodes. Reject a damaged header or length before it can authorize another CREATE_KEYBAG. Signed-off-by: Adrian Rangel <adrian@acrogenesis.com>
Signed-off-by: Adrian Rangel <adrian@acrogenesis.com>
|
@acrogenesis, I closed #506, which this PR targets. This repo is frozen, and aurora-silicon/linux has the M1 xART guard off by default (aurora-silicon/linux#1049). Thanks for the race fix and the rework. I'm leaving this PR for you to close or carry over, whichever you prefer. |
|
Thanks, Naeem. I’m keeping this branch available as a reference for the guarded 7.2 work. The registration port for 7.3 is separate. A guarded enable path on the new kernel would need to account for the new M1 default and the removal of the read-only controls. The Mac package still requires a compatible guard before enabling Touch ID on these models. 7.3 registration PR · Mac package PR |
This proposes fixes directly onto Naeem Malik’s storage-guard branch for #506. Merging here updates that PR. Poul Guo Skov’s original pinning commit and Naeem’s full series remain in its history.
On the M1 Air (J313), provisioning can pin two existing records. The third can be admitted only while the driver is performing the first activation after a successful guarded create. There is no open admission window while the machine waits for a user to open the reader. On J314s, J316s and J316c, the measured allowance is one provisioning record. J293 can reuse its previously recorded pins. Its published hardware report does not establish a count for a fresh setup. Every board still needs the normal guard checks before any pin is allowed.
A completed setup records the UUID of the committed identity. A spent marker alone cannot establish that the active identity was created under the guard. Upgraded installations with a valid older pin list get a separate diagnostic state; a successful real match can confirm the older identity for the current boot. A refusal always takes precedence. The package can check the driver’s advertised capability before loading it and its effective policy once it is running.
Evidence
d7cbd45fe. A later, narrower window failed on that Air. The reviewer’s most recent staging attempt could not findmt7932_fullmac. First-time hardware qualification of this revision is still open. Commit explaining both J313 runsThe diagnostic ABI is now version 3. The package can use
xart_guard_pins_abi=1before insertion, then check the effectivexart_guard_pinsvalue on the running device. The keybag writer syncs both the intent and its directory before asking the enclave to create the identity.The final patch also requires the complete canonical refusal record before the driver may attempt another create. A partial or damaged record keeps the current identity intact. For
4beecf0d7327, all 142 SEP KUnit cases passed, including the new keybag refusal test. The guard changes also passed the focused host and packaging tests. The packaging-only follow-upa352e2d2b279verified all 11 Arch source checksums withmakepkg --verifysource. The KUnit image was built in ARM Lab and booted in diskless ARM KVM. The branch also merges cleanly with #525. The combined tree passed all 143 SEP KUnit cases. A separately built combined module exposed both capability tags and loaded in a diskless guest with writes and provisioning disabled. The Mac package accepted that ELF on the J313 and J316c fixtures and rejected the preserved earlier guarded module.The hardware evidence above belongs to the original work. This revision still needs a physical first setup, match and restart. Thanks to Naeem, Poul, Marcelo Alcantara (@maralcbr) and the testers on each board.