Repository navigation
soc: apple: sep: let SEP_BIO_REARM end only the wait after boot - #3510
Conversation
After a restart Touch ID waits for the first password (SEP_BIO_REQUIRE_PASSWORD). That wait belongs to the machine, not to a fingerprint: on macOS the login password enables Touch ID for fingers added later in the same boot. The re-arm helper could only end it with SEP_BIO_REARM, which also ends a lockout and clears failed matches. So it refused a password of an account with no enrolled finger yet, and Touch ID stayed off after that account enrolled its first finger, until a second password. Add SEP_BIO_REARM_FLAG_BOOT_WAIT_ONLY in the request's reserved word. With it, SEP_BIO_REARM ends only the after-boot wait and hands the saved lockout record to the enclave, as after any first password. A lockout, the failed matches and the lockout record are left as they are, and still need the plain SEP_BIO_REARM after an enrolled account's password. The check and the change happen in the one request, so state that userspace read before cannot go stale. Older kernels refuse the flag with -EINVAL, so a helper that asks for it fails closed there. Signed-off-by: Ryan Murray <[email protected]>
There was a problem hiding this comment.
Verdict: MERGE at 04da8bb after required checks and coordinated qualification.
Checked: The ioctl size and number are unchanged, unknown flags reject, and both dispatches retain the admin check. Boot-only dispatch clears the boot latch and runs the existing record import; it never calls the general reset or writes the lockout record. The paired J616s row reports that the recorded lockout survives and the enrolled password still clears it through the old operation. Run hosted KUnit and retain peer qualification before rollout.
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
|
code-owner ping <@422957901716652033> / @DjDeveloperr: merge train at |
|
Second-family hardware row at 04da8bb: J413 (M2 Air, T8112), with aurora-sep-userspace#48 at a1b94070. It is a one-shot boot of this head on the fleet89 config; the default kernel is unchanged.
This matches the J616s (T6040) row. |
|
Merging under the 6-point rule (Ryan 09:29, permanent), at |
What
After a restart Touch ID waits for the first password (
SEP_BIO_REQUIRE_PASSWORD). That wait belongs to the machine: on macOS the login password also enables Touch ID for a finger added later in the same boot. Userspace could only end it withSEP_BIO_REARM, which also ends a lockout and clears failed matches. So the re-arm helper had to refuse the password of an account with no enrolled finger, and Touch ID stayed off after that account enrolled its first finger, until a second password (aurora-silicon/aurora-sep-userspace#47).This adds
SEP_BIO_REARM_FLAG_BOOT_WAIT_ONLYin the oldreservedword ofstruct sep_bio_rearm. With it,SEP_BIO_REARMends only the after-boot wait and hands the saved lockout record to the enclave, as after any first password. A lockout, the failed matches and the record stay as they are and still need the plainSEP_BIO_REARMafter an enrolled account's password. The check and the change happen in the one request, so state that userspace read earlier can't go stale (that was the blocking finding on aurora-silicon/aurora-sep-userspace#48). Older kernels refuse a nonzeroreservedword with-EINVAL, so a helper that asks for the flag fails closed there.Userspace: aurora-silicon/aurora-sep-userspace#48 (needs this; without it the print-less path is refused).
Tested: J616s T6040 at 04da8bb pass (one-shot 7.3.0-aurora-tidarm1 = main 00fbe80 + this commit, fleet89 config, default cmdline, Enforcing, 0 failed units, 0 AVC). Boot wait plus a lockout restored from a locked record: a print-less gdm-password ends the wait and the lockout stays (record unchanged). The next print-less password is refused, and the enrolled account's password then clears the lockout through the plain REARM. Boot wait alone: a wrong password keeps it, a print-less gdm-password arms Touch ID, and a verify then starts a capture. Back on fleet89 (no flag), the same helper gets EINVAL and the wait stays.
Risk: two-way (new uapi flag in a reserved field; old userspace sends 0 and sees no change). Macs: every Touch ID Mac (J616s, K114s, J413).
Not yet
sep_rearm_requestwas updated (flag accepted, unknown bits refused). Built with the trial kernel, not run on hardware (no on-hardware KUnit).Details
bio.rs:read_rearmreturns{password, boot_wait_only}; any flag bit other thanSEP_BIO_REARM_FLAG_BOOT_WAIT_ONLYis-EINVAL.sbio.rs:end_boot_wait_after_password()doesbio_after_boot.xchg(false)and the usualimport_lockout_after_password(). It never touches the lockout, failure count or record. Admin only, likeREARM.apple_sep: Touch ID: armed by the first password since this boot (an account with no fingerprints yet; a lockout, if any, stays).traces/touchid/20261128-touchid-arm/v4/(pre/trial/post logs + scripts, README).