Repository navigation
soc: apple: sep: sep-key interface 4 (keys under a user's key bag, password checked by the enclave); Touch ID lockout record after the first password - #1544
Merged
Conversation
…ssword The enclave refuses LOAD_LOCKOUT (0x8002) at every boot because Linux sends it during the Catacomb restore, before the user's first unlock and the sensor's registration; macOS loads the record only after all three. Note at restore time whether a record is stored and hand it back on the first password authentication of the boot, before the re-arm clears any count. A refusal is no longer reported as an empty record: the host record keeps the failed-attempt count and the next SAVE_LOCKOUT replaces the stored one. Assisted-by: LLM Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ssword checked by the enclave With the per-user key bag whose secret is the login password, the enclave can check the user's own password, so macOS's .userPresence (Touch ID or the password) works without a root-held passcode (variant-5 key store, INFO feature PASSWORD): - SEP_KEY_CREATE_USER makes a .userPresence key under uid's bag, or with flags 0 a key with no list that works only while the bag is unlocked (class 9). Version-2 handles name the uid. - SIGN / UNSEAL on a user-presence key wait for a Touch ID match under the user's bag, through the same one-grant-per-match KeyGrant as biometric keys; a no-list key runs directly. - SEP_KEY_SIGN_PASSWORD / SEP_KEY_UNSEAL_PASSWORD hand the bag's password to the enclave (VERIFY_SECRET into a fresh OwnedContext; the enclave counts a wrong one), run the one operation and drop the context. The kernel keeps no copy; the request copy is wiped when it drops. - Root or the bag's own uid may make these calls (new euid shim). - User bags are designated at USER_BAG_BASE + uid, so no uid shares the identity bag's designation (1000, Touch ID's catacomb user). INFO feature PERSISTENT_ATTEMPTS is defined and not set: on the Neo the enclave counts wrong passwords live (1, 2, 3) but a bag exported after three failures imports after a reboot with none, and the enclave keeps no xART record for user bags, so a PIN retry limit built on it would not be root-proof. Assisted-by: LLM Co-Authored-By: Claude Opus 5.5 <[email protected]>
Assisted-by: LLM Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Nov 11, 2026
Merged
This was referenced Nov 20, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SEP_KEY_CREATE_USER(variant-5 key store,INFO.featuresPASSWORD): a.userPresencekey underuid's per-user key bag, or with flags 0 a key with no list that works only while the bag is unlocked. Version-2 handles name the uid.SIGN/UNSEALon a user-presence key wait for a Touch ID match under the user's bag (one KeyGrant per match, as for biometric keys);SEP_KEY_SIGN_PASSWORD/SEP_KEY_UNSEAL_PASSWORDhand the bag's password to the enclave instead (VERIFY_SECRETinto a fresh OwnedContext; the enclave counts a wrong one).0x01000000 + uid, so no uid shares the Linux identity bag's designation (1000).FEATURE_PERSISTENT_ATTEMPTSis defined and not set: the enclave's wrong-password count does not survive a reboot.LOAD_LOCKOUTis sent after the first password of the boot instead of during the Catacomb restore.Neo, no finger (same changes on fleet61, before the rebase): interface 4 rows 11/11 (no-list key signs while unlocked, refused while locked, signs again after unlock; SIGN_PASSWORD right password signs, wrong password EACCES and counted, refused while locked); LOAD_LOCKOUT accepted (status 0) after the first password, refused with 0x8002 at every boot before; Enforcing, 0 failed. KUnit: handle v2, designation, password checks, ioctl sizes, INFO.
🤖 Generated with Claude Code