Repository navigation
soc: apple: sep: let a password clear Touch ID's failed attempts - #1143
Conversation
On macOS a password typed in a Touch ID prompt verifies the user's key bag in the enclave, and that clears the failed-attempt count: after a missed prompt and a password, the next prompt again has five attempts before Touch ID locks. The driver's re-arm did nothing unless Touch ID was already locked, so misses before a password still counted afterwards, and two more misses in the next prompt could lock Touch ID. When the re-arm comes while Touch ID is not locked, clear the host's failed-attempt count and its record. The full enclave re-arm stays for a real lockout. The re-arm helper calls this after a verified password; it needs to do so when failed attempts are pending as well as when Touch ID is locked. Signed-off-by: Ryan Murray <[email protected]> Assisted-by: LLM
A password typed after a missed Touch ID prompt cleared only the host's failed-attempt count. The enclave keeps its own count of completed no-matches and locks Touch ID at five; a password clears that count on macOS, where the key bag verification it triggers resets it. Here the enclave's count stood, so three misses, a password and two more misses locked Touch ID while the host reported two of five. When failed attempts are pending, run the enclave side of a re-arm as well: the key bag verification, a new match credential and the lockout record save, the same steps that end a real lockout. Do not wait for the sensor lock to do it. A verify holds that lock for its whole wait for a touch, and a lock screen takes the password while one waits; the re-arm call, and with it the password authentication, would stall until the capture timed out. Clear the host's count at once and, when the lock is taken, owe the enclave's clear to the start of the next authentication. A match clears both counts and drops what is owed. The re-arm helper must call the re-arm whenever failed attempts are pending, and calling it after every password should cost nothing. Say so in the lockout state's former reserved word: SEP_BIO_LOCKOUT_FLAG_EVERY_ PASSWORD tells it that this driver's re-arm never waits for a capture while Touch ID is not locked. An older driver's re-arm does wait, so the helper keeps to locked-only calls there. Signed-off-by: Ryan Murray <[email protected]> Assisted-by: LLM
|
TID10: added b4dace5 ("clear the enclave's failed attempts on a password too"). It fixes two things in this PR:
The new Gates: checkpatch 0/0, W=1 0, KUnit apple_sep* 176/180 (4 = base host_store). Runs in test kernel 7.3.0-aurora-fleet22-tid27 (Neo no-finger gate next). |
|
Hardware finger test PASSED on the MacBook Neo, 2026-11-08 ~14:20, by Ryan on kernel 7.3.0-aurora-fleet22-tid27 (#1087 + #1134 + #1143), libfprint aurora10, aurora-touchid-rearm 1-2.
|
The lift-gated re-arm, the retry limits, the lock states and the password re-arm read nothing from the platform profile, and the lift detector was only tested with statuses from the J700's 0x3356 sensor. The M1, M1 Pro/Max, M2, M2 Pro/Max and M3 Macs carry the 0x3352 part. Add two KUnit cases: - apple_sep_sensor_status: for every Mesa revision the driver knows, idle, armed, finger-on, frame-ready and needs-patch statuses decode to the same finger-on/finger-off verdict, and the idle status reads the revision back. - apple_sep_profile: every Mac with a built-in sensor (J313, J316s, J316c, J414s, J414c, J413, J415, J613, J615, J614s, J616s, J616c, J713, J700) selects a profile whose sensor is one of those revisions, so the shared path decodes it. Signed-off-by: Ryan Murray <[email protected]> Assisted-by: LLM
…word-clears-count
Every start on the M2 (fleet30 + this series) logged a new boot warning: "LOAD_LOCKOUT refused the saved lockout record (0x8002 ...)". The enclave refuses a record older than the restored catacombs, and the host record already carries the failed-attempt count in that case, so nothing is lost and nothing needs the user's attention. Before this series the same answer was taken without a warning. Log it once at info level, next to the restore outcome, so the boot log stays free of warnings. Why the enclave refuses the record at start is tracked separately. Signed-off-by: Ryan Murray <[email protected]> Assisted-by: LLM
|
Merged after the cross-Mac gate. The Touch ID path here has no SoC gating, and it now runs the same on every Touch ID Mac:
|
Stacked on #1134. Retarget after it merges.
On macOS a password typed after missed Touch ID attempts clears the enclave's failed-attempt count, so the next prompt again has five attempts. The Linux re-arm did nothing unless Touch ID was already locked. After #1134's limits (3 per prompt, 5 to a lockout), three misses in
sudofollowed by the password left only two attempts for the next prompt.This commit changes the re-arm when Touch ID is not locked: it clears the host's failed-attempt count and its record. The full enclave re-arm stays for a real lockout.
The userspace half is aurora-silicon/aurora-sep-userspace#6 (commit "touchid-rearm: let a password clear pending failed matches"). With it, the helper also verifies the password and re-arms when failures are pending. It still answers at once, checking nothing, when no failures are pending.
Tests
drivers/soc/apple: 0 warnings.make check: 12/12 pass, including 2 new tests.🤖 Generated with Claude Code