You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
apple_sep: Touch ID is lost after a boot policy change when DESIGNATE_KEYBAG comes before the trusted-key unlock #1190
After a boot policy change, Touch ID stops working and stays off on every boot until aurora-sep-policy-change is run and the Mac is rebooted. Every Recovery enrolment of a Stage 1 is such a change. The keybag, ref-key and fingerprints are intact; the driver's own one-boot window for this case doesn't open.
Seen on: J616s (T6040), integration/aurora with #985, #1079 and #1184, Arch Linux ARM, Touch ID enrolled on Linux. It happened after every Recovery enrolment on 2026-11-07, for a raw Stage 1 and a Mach-O Stage 1 alike (boots at 16:54, 17:28 and 19:29 on raw, 19:41 on Mach-O), and the same refusal repeats on every boot until the allowance is used:
apple_sep: xART guard level 1: 11 session records exist, 0 created by Linux; the other 11 are protected
apple_sep: xART guard: refused to rewrite kind-4 record <id>, which this Linux install did not create
apple_sep 406600000.sep: sks: DESIGNATE_KEYBAG got no reply after 2038 ms
apple_sep 406600000.sep: sks: DESIGNATE_KEYBAG did not complete; enrolment will refuse
apple_sep 406600000.sep: matching unavailable this boot: cold-match preparation, SCRD credential, Catacomb restore, or identity proof did not complete; template state is unproven
Why:xart_guard.rs lets the one kind-4 rewrite of a policy change through only inside policy_window. The only callers of policy_window are the trusted-key unlocks in refkey.rs (lines 287 and 362). Touch ID's restore path in sbio.rs (line 1991) calls sks_designate_user_keybag outside any window. On this Mac that DESIGNATE is the first use of the identity keybag under the new policy, so the enclave's rewrite comes during it. The guard refuses it and DESIGNATE_KEYBAG never answers. The trusted-key unlock that would have opened the window doesn't run first.
Workaround: run aurora-sep-policy-change once, then reboot. The next boot logs xART guard: allowed one rewrite of kind-4 record <id> for a boot policy change and Touch ID: restored 1 enrolled identity. On a distribution without SELinux the tool crashes after arming the allowance (the allowance still works); #1189 fixes that.
Possible fix, untested: run that first DESIGNATE under the window too, as the module comment describes the window ("the first unlock of an identity keybag that already existed, at most once per boot"):
I haven't sent this as a PR. Testing it needs another boot policy change on hardware, and this Mac now boots its daily install from that very enrolment. If someone has a Mac where a re-enrolment is cheap, I can turn it into a PR with their result.
Same failure on a MacBook Air M3 (J613, T8122), so it isn't specific to the J616s.
First change (2026-11-07): I moved Stage 1 from raw m1n1 to the Aura 1.0.0b5
Mach-O Stage 1. The first boot of a 7.3 kernel built on integration/aurora 11eccbe (which has e89d4a2) logged, in this order:
sks: LOAD_KEYBAG reply mailbox status 0, ...
apple_sep: xART guard: refused to rewrite kind-4 record <id>, which this Linux install did not create
sks: DESIGNATE_KEYBAG got no reply after 2037 ms
sks: DESIGNATE_KEYBAG did not complete; enrolment will refuse
hwrng: read produced nothing (ETIMEDOUT)
matching unavailable this boot ...
T8122 takes T8112's variant-5 key store. So, as on your J616s, the only sender
of DESIGNATE_KEYBAG is activate_touchid(), and it runs outside policy_window. This Mac's login screen offers Touch ID, so fprintd opens the
sensor before anything unseals a trusted key, and the designate is the
keybag's first use.
The workaround worked:aurora-sep-policy-change with no arguments armed
that record. The next boot logged:
xART guard: this boot may rewrite kind-4 record <id> once, for a boot policy change
xART guard: allowed one rewrite of kind-4 record <id> for a boot policy change; its previous value is in /var/lib/aurora-sep-xart-policy-previous.bin
Touch ID: restored 1 enrolled identity/identities; enrolment survived reboot
The Catacomb restore went through too. On later boots a kernel without the
allowance code (from omacom/linux-aurora) brought Touch ID up as usual. The 11eccbe copy of the tool had the restorecon crash you mentioned; #1189 fixed
that.
A planned change worked the first time (2026-11-08): I enrolled another
Stage 1 build (1.0.0b5-hsusb1). Before the 1TR enrolment I ran aurora-sep-policy-change --expect on the daily kernel, which has the guard but
not the allowance code. Then I made the first boot afterwards the 7.3 kernel.
Touch ID survived that boot with no refusal round. On a kernel from before the
allowance code, the refusal line names no session id, so --expect is the only
way to arm from there.
Fix:#1340 runs that designate in policy_window, as you suggested, with a
host test and the docs (including the procedure above). It's built, and the apple_sep KUnit suites pass on arm64 QEMU. It hasn't been tested across a real
policy change yet: that takes another Stage 1 enrolment.
Activity
satchlj commentedon Nov 9, 2026
Same failure on a MacBook Air M3 (J613, T8122), so it isn't specific to the J616s.
First change (2026-11-07): I moved Stage 1 from raw m1n1 to the Aura 1.0.0b5
Mach-O Stage 1. The first boot of a 7.3 kernel built on integration/aurora
11eccbe (which has e89d4a2) logged, in this order:
T8122 takes T8112's variant-5 key store. So, as on your J616s, the only sender
of DESIGNATE_KEYBAG is
activate_touchid(), and it runs outsidepolicy_window. This Mac's login screen offers Touch ID, so fprintd opens thesensor before anything unseals a trusted key, and the designate is the
keybag's first use.
The workaround worked:
aurora-sep-policy-changewith no arguments armedthat record. The next boot logged:
The Catacomb restore went through too. On later boots a kernel without the
allowance code (from omacom/linux-aurora) brought Touch ID up as usual. The
11eccbe copy of the tool had the restorecon crash you mentioned; #1189 fixed
that.
A planned change worked the first time (2026-11-08): I enrolled another
Stage 1 build (1.0.0b5-hsusb1). Before the 1TR enrolment I ran
aurora-sep-policy-change --expecton the daily kernel, which has the guard butnot the allowance code. Then I made the first boot afterwards the 7.3 kernel.
Touch ID survived that boot with no refusal round. On a kernel from before the
allowance code, the refusal line names no session id, so
--expectis the onlyway to arm from there.
Fix: #1340 runs that designate in
policy_window, as you suggested, with ahost test and the docs (including the procedure above). It's built, and the
apple_sepKUnit suites pass on arm64 QEMU. It hasn't been tested across a realpolicy change yet: that takes another Stage 1 enrolment.
tools/aurora-sep: XART-SAFETY.md: arm --expect before a Stage 1 change
soc: apple: sep: open the boot policy window for Touch ID's designate