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
M1 Pro SEP: retain unresolved attach and post-resume session failures #42
area:sepAffected sep subsystemlaunch:follow-upRetained improvements or broader retests outside the initial launchowner:kernelImplementation belongs to kernelpriority:P2Recovery, performance or hardware qualificationstatus:investigationFailure is open; mechanism needs confirmation
J316S sequence-counter setup failed at attach and verification remained unavailable; J314S separately reported transient attach failures despite successful enrollment/reboot/resume runs. A success on another Mac does not identify either failure.
Completion criteria: Record each named board’s first attach/capture/resume failure and both firmware fields. Fix finite retry/session ownership at the established failure stage without deleting fingerprints, reprovisioning keybags or breaking successful resume. Keep the two reproductions separately identified.
This ticket carries forward the remaining work; source inclusion, release delivery and hardware acceptance are recorded separately.
Remaining suspend change: PR #7 still contains 8eb00bb78f1e: return -EBUSY when capture does not drain, then abort/roll back suspend. The current implementation continues after that failure. Port this narrowly and test drain timeout, rollback, late completion and successful resume; it does not resolve the separate sealed-key persistence guarantee in #23.
J316S, aurora-2026.10.17.20: the nonce session never commits at attach (SESSION_COMMIT refused 0xfffffffe, one garbled session reply), and every in-boot re-registration is then refused 0x16 — including the fresh stage-0 one.
Same machine as the J316S reproduction in the original report (apple,j316s / apple,t6000, MacBook Pro 16" M1 Pro 2021, profile T6000/J316s, protocol sepos13), but a different failure stage than the sequence counter: session setup failed one. Recording it separately as the completion criteria ask.
The only apple_sep module parameter on this build is sensor_spi_mode (0xffffffff, unset). There is no xart_guard here, so nothing to toggle and no guard refusal in the log.
The failure, attach-time (boot 2026-10-29 01:22:14, attach: cold)
Cold-match prep and the Catacomb restore both succeed, stage-0 serial registration succeeds, and then the session commit is refused:
01:22:25.144 sbio: native 13.5 communication initialization accepted
01:22:25.342 sbio: identity count 0 before the cold-match preparation
01:22:25.570 scrd: cold-match credential established true
01:22:25.572 sbio: master catacomb LOAD_CATACOMB answered status 0 with post-load state Some(3)
01:22:25.572 sbio: restore master catacomb state Some(1) outcome Restored
01:22:25.576 sbio: owner catacomb LOAD_CATACOMB answered status 0 with post-load state Some(3)
01:22:25.576 sbio: restore owner catacomb state Some(1) outcome Restored
01:22:25.582 sbio: user catacomb LOAD_CATACOMB answered status 0 with post-load state Some(3)
01:22:25.582 sbio: restore user catacomb state Some(1) outcome Restored
01:22:25.583 sbio: restore lockout outcome EmptyTolerated
01:22:25.583 sbio: cold-match preparation true, component restore true
01:22:25.583 sbio: identity count 2 after Catacomb restore with sensor registered
01:22:25.583 sbio: cold restore candidate ready; waiting for device-view proof
01:22:25.602 sbio: registering sensor at bring-up stage 0
01:22:25.613 sbio: identity count 2 after sensor serial registration
01:22:25.625 sensor: SESSION_COMMIT refused with status 0xfffffffe
01:22:25.625 sensor: re-read 0 frame(s) the sensor still offered after a garbled read, discarded 1 stale frame(s)
01:22:25.626 sensor: SESSION_COMMIT failed 41 ms after power-on; sensor now state 0 ack 0x60 identifier true holding 0 bytes
01:22:25.626 sbio: the sensor did not wake at attach; the next verify retries the bring-up
0xfffffffe is a real answer from the enclave (DeviceStatus::Answered), not the silent/never-written sentinels. The stale frame was drained while reading the reply back from the sensor (sbio.rs:2314, read_session_reply), and the reply itself passed its length check (no short session share warning), so the 40-byte share was relayed and only the commit was refused. That garbled frame is the only transport-level anomaly anywhere in the log.
Because wake_sensor() returns None there, complete_bringup() never runs: no COMPLETE_INIT, no sync_device_view(), no device-view identity proof, and no Touch ID: restored N enrolled identity/identities line for this boot. The enrolment itself is intact in the keybag (identity count 2 after Catacomb restore); the driver just never gets to prove it.
Every verify re-enters retry_restore_proof() (sbio.rs:1383), and every registration it attempts is refused 0x16 — including the stage-0 one that follows its own fresh power cycle:
01:27:21.447 verify: attach-time bring-up left the device-view proof undone; retrying the sensor bring-up
01:27:21.469 sbio: registering sensor at bring-up stage 2
01:27:21.469 sbio: identity count 2 before CLEAR_STATE for sensor re-registration
01:27:21.469 sbio: identity count 2 after CLEAR_STATE for sensor re-registration
01:27:21.474 sensor: REGISTER_SERIAL refused with status 0x16
01:27:21.474 sensor: REGISTER_SERIAL failed 26 ms after power-on; sensor now state 0 ack 0x60 identifier true holding 0 bytes
01:27:21.475 sensor: the enclave did not register the sensor
01:27:21.475 verify: retrying the sensor bring-up from a fresh registration
01:27:21.494 sbio: registering sensor at bring-up stage 0
01:27:21.500 sensor: REGISTER_SERIAL refused with status 0x16
01:27:21.501 sensor: the enclave did not register the sensor
01:27:21.501 verify: the retried sensor bring-up failed
01:27:21.501 verify: refusing before touching the sensor; cold-match prep, restore, or device-view identity proof did not complete. This is not a non-matching finger
The comment at sbio.rs:1394-1402 covers "the enclave can refuse the serial re-registration that follows CLEAR_STATE, while a reboot's fresh registration works". Here the fresh stage-0 registration after its own power cycle is refused as well, so the ladder as written has no path that succeeds. The refusal outlives the power cycle but not a reboot, which points at enclave-side state that only a fresh handshake clears, not at the sensor's own state — the sensor reports state 0 ack 0x60 identifier true holding 0 bytes identically on every refusal.
14 verify attempts this boot (each one Device reported an error during identify: An unspecified error occurred! in fprintd), the last four at 02:11:19-02:11:39. They stop as soon as fprintd deactivates; there is no 250 ms retry storm behind this.
Every boot on this build, so far
boot
up
signature
REGISTER_SERIAL refused
SESSION_COMMIT refused
identify errors
Oct 19 05:03
1 d 18 h
capture: the sensor fell to state 9, then 0x16
104
61
6303
Oct 20 23:44
4 d 2 h
capture: state 9, then 0x16
115
117
14721
Oct 25 23:19
23 min
clean (restored 2)
0
0
2
Oct 25 23:42-23:53
installer boots
clean
0
0
0
Oct 25 23:53
10 min
clean (restored 2)
0
0
2
Oct 26 00:05
3 d
capture at 00:28: state 9, did not come back online, then 0x16
175
196
11808
Oct 29 01:22
(current)
attach-time SESSION_COMMIT 0xfffffffe, then 0x16
26
1
14
So 4 of 9 boots on 20261017.20 lost the sensor: three at capture time (state 9, the family already described in the #25 comment), and this one at the session commit during attach. Same driver build attaches cleanly on the other 5, so nothing about the machine, keybag or firmware has drifted.
Two logging notes, since they cost time here
note_sensor_recoveries() is called from sensor_step_failed() (sbio.rs:1797), so the garbled-frame line is attributed to SESSION_COMMIT even though the frame was discarded during read_session_reply() a step earlier. Calling it once after the reply read would put the corruption on the step that saw it.
0x16 has a name (SBIO_STATUS_16, sbio.rs:4611) but no interpretation, and 0xfffffffe has neither. Both are printed raw. A one-line note per status word in the refusal helper (sbio.rs:1829) would separate "enclave says no" from "the sensor exchange was corrupt".
Not tested / not this
No reboot yet on this boot: rmmod apple_sep is refused on M1, so reboot is the only re-attach path and I have not rolled it. No workaround included in this report.
J316S on linux-aurora 7.2.11.aurora9-1 (7.2.11-9-1-ARCH): attach still fails on about half the boots, in two ways. The second way leaves the sensor unpatched, so every capture falls to state 9 (STATE_NEEDS_PATCH).
Same board as above (apple,j316s / apple,t6000, profile T6000/J316s), os-fw-version 13.5, iBoot mBoot-20457.41.3. The enrolment came from 11.36, with xart_guard=0 (#269).
Boot
Attach
Verify
2026-10-29 12:27
Stage 0 registers and patches the sensor first time
Matches
2026-10-29 18:31
SESSION_COMMIT refused 0xfffffffe after a garbled read, then REGISTER_SERIAL refused 0x16 on all 5 attempts (the case above)
refusing before touching the sensor
2026-10-29 19:01
Attempt 1: session reply read failed: ETIMEDOUT, sequence counter: session setup failed, sensor patch: sequence counter init failed before the patch fetch. Attempt 2 (stage 2) registers, and the restore and device-view proof complete.
Every capture: verify: the sensor fell to state 9 during the capture
On the 19:01 boot, the stage-2 retry declares the sensor online even though the patch step never ran, and nothing retries the patch, so the sensor stays at state 9. retry_restore_proof() notes that the patch step has no retry. This boot is that case, reached through attach_bring_sensor_online()'s retry rather than the verify-time one.
Log excerpt (19:01 boot):
sensor: session reply read failed 1310 ms after power-on; sensor now state 0 ack 0x60 identifier true holding 0 bytes
sequence counter: session setup failed
sensor patch: sequence counter init failed before the patch fetch
sbio: the sensor did not wake at attach
sensor: attach-time bring-up attempt 1 of 5 failed; starting again in 500 ms
sbio: registering sensor at bring-up stage 2
Touch ID: restored 1 enrolled identity/identities; enrolment survived reboot
sbio: restore-ready after device-view proof true
sensor: interrupt-driven capture
verify: the sensor fell to state 9 during the capture
Opened #435 for the two logging gaps noted above (misattributed note_sensor_recoveries() and unlabeled 0x16/0xfffffffe status
words) — code-analysis only against integration/aurora, not run on
hardware, doesn't touch the retry ladder or session-ownership bug
itself. Posting it as a smaller mechanical piece so reproducing the
actual attach/capture failures here is easier to read in the
meantime.
Data point from a J314s (14" M1 Pro, t6000). Touch ID fails at random on each attempt. It isn't tied to one boot: it fails and succeeds within the same boot and the same resume.
The driver selects the T6000/J316s SEP profile on this J314s. That may be intended for all T6000 machines; I'm mentioning it in case it isn't.
How often: since 10-20, sudo/pkexec verifies succeeded 87 times and failed 49 times (~36% fail). Each failure falls through to the password. On the boot below, 4 of 4 verifies failed, with no suspend in between.
Boot-time restore works: 3 identities restored, "enrolment survived reboot". The failures happen afterwards, while the sensor is re-registered for each verify, before a finger can be read. I see three variants:
1. Serial read timeout during registration
[ 442.067065] apple_sep 396400000.sep: sbio: registering sensor at bring-up stage 2
[ 442.073016] apple_sep 396400000.sep: sbio: identity count 3 after sensor serial registration
[ 442.236078] apple_sep 396400000.sep: sbio: registering sensor at bring-up stage 2
[ 442.239711] apple_sep 396400000.sep: sbio: identity count 3 after CLEAR_STATE for sensor re-registration
[ 443.497555] apple_sep 396400000.sep: sensor: serial read failed: ETIMEDOUT
[ 443.498022] apple_sep 396400000.sep: sensor: serial read failed 1279 ms after power-on; sensor now state 0 ack 0x60 identifier true holding 0 bytes
[ 443.498215] apple_sep 396400000.sep: sensor: the enclave did not register the sensor
[ 443.498402] apple_sep 396400000.sep: verify: the sensor did not come back online
(The second stage-2 registration starts 170 ms after the first, and only the second one times out.)
2. Session reply timeout, so the patch is never fetched
[ 562.037065] apple_sep 396400000.sep: sbio: registering sensor at bring-up stage 2
[ 562.044878] apple_sep 396400000.sep: sbio: identity count 3 after sensor serial registration
[ 563.273326] apple_sep 396400000.sep: sensor: session reply read failed: ETIMEDOUT
[ 563.275750] apple_sep 396400000.sep: sensor: session reply read failed 1256 ms after power-on; sensor now state 0 ack 0x60 identifier true holding 0 bytes
[ 563.276620] apple_sep 396400000.sep: sequence counter: session setup failed
[ 563.277278] apple_sep 396400000.sep: sensor patch: sequence counter init failed before the patch fetch
[ 563.277875] apple_sep 396400000.sep: verify: the sensor did not come back online
3. Registration succeeds, then the sensor drops to state 9 (NEEDS_PATCH) during the capture
[ 4258.903192] apple_sep 396400000.sep: sbio: registering sensor at bring-up stage 2
[ 4258.910019] apple_sep 396400000.sep: sbio: identity count 3 after sensor serial registration
[ 4259.048040] apple_sep 396400000.sep: verify: the sensor fell to state 9 during the capture
This one fails 140 ms after the registration starts, too soon for a finger to have been read. A later attempt failed the same way after 660 ms (4376.96 → 4377.62).
Between these, the attempt at 558.5 s got through registration and armed interrupt capture (apple-mesa spi1.0: sep sensor: data-ready IRQ 142 configured for interrupt capture). So the SPI and IRQ path works when the handshake does.
Userspace effect: all three variants reach fprintd as driver status 1 (FAILED). The #1332 retry only covers status 5 (RETRY), so pam_fprintd gives up on the first failure. Re-running the command usually works within one or two tries. If the kernel can't make re-registration reliable yet, reporting these transient bring-up failures as RETRY, or retrying the re-registration once inside the driver, would hide most of them.
I can collect more logs (dynamic debug, a specific sensor_spi_mode, a test kernel) if that helps.
area:sepAffected sep subsystemlaunch:follow-upRetained improvements or broader retests outside the initial launchowner:kernelImplementation belongs to kernelpriority:P2Recovery, performance or hardware qualificationstatus:investigationFailure is open; mechanism needs confirmation
Activity
cad0p commentedon Oct 29, 2026
J316S,
aurora-2026.10.17.20: the nonce session never commits at attach (SESSION_COMMITrefused0xfffffffe, one garbled session reply), and every in-boot re-registration is then refused0x16— including the fresh stage-0 one.Same machine as the J316S reproduction in the original report (
apple,j316s/apple,t6000, MacBook Pro 16" M1 Pro 2021, profileT6000/J316s, protocolsepos13), but a different failure stage than thesequence counter: session setup failedone. Recording it separately as the completion criteria ask.Build and both firmware fields
linux-aurora 7.1.12.aurora2-20261017.20(7.1.12-2-20261017.20-sep-ARCH),aurora-touchid 20261003-2,libfprint 1.94.100-1.1,fprintd 1.94.5-2,m1n1-aurora 1.6.1.aurora17-5,uboot-asahi 2026.07.asahi2-1.asahi,os-fw-version13.5,asahi,system-fw-version26.4 (asahi,iboot1-versionmBoot-18000.101.7,asahi,iboot2-versioniBoot-8422.141.2; m1n1 stage1v1.6.1, stage2v1.6.1-omarchy.aurora17).apple_sepmodule parameter on this build issensor_spi_mode(0xffffffff, unset). There is noxart_guardhere, so nothing to toggle and no guard refusal in the log.The failure, attach-time (boot 2026-10-29 01:22:14,
attach: cold)Cold-match prep and the Catacomb restore both succeed, stage-0 serial registration succeeds, and then the session commit is refused:
0xfffffffeis a real answer from the enclave (DeviceStatus::Answered), not the silent/never-written sentinels. The stale frame was drained while reading the reply back from the sensor (sbio.rs:2314,read_session_reply), and the reply itself passed its length check (noshort session sharewarning), so the 40-byte share was relayed and only the commit was refused. That garbled frame is the only transport-level anomaly anywhere in the log.Because
wake_sensor()returnsNonethere,complete_bringup()never runs: noCOMPLETE_INIT, nosync_device_view(), no device-view identity proof, and noTouch ID: restored N enrolled identity/identitiesline for this boot. The enrolment itself is intact in the keybag (identity count 2 after Catacomb restore); the driver just never gets to prove it.The in-boot ladder cannot recover from this stage
Every verify re-enters
retry_restore_proof()(sbio.rs:1383), and every registration it attempts is refused0x16— including the stage-0 one that follows its own fresh power cycle:The comment at
sbio.rs:1394-1402covers "the enclave can refuse the serial re-registration that followsCLEAR_STATE, while a reboot's fresh registration works". Here the fresh stage-0 registration after its own power cycle is refused as well, so the ladder as written has no path that succeeds. The refusal outlives the power cycle but not a reboot, which points at enclave-side state that only a fresh handshake clears, not at the sensor's own state — the sensor reportsstate 0 ack 0x60 identifier true holding 0 bytesidentically on every refusal.14 verify attempts this boot (each one
Device reported an error during identify: An unspecified error occurred!infprintd), the last four at 02:11:19-02:11:39. They stop as soon asfprintddeactivates; there is no 250 ms retry storm behind this.Every boot on this build, so far
REGISTER_SERIAL refusedSESSION_COMMIT refusedthe sensor fell to state 9, then0x160x16restored 2)restored 2)state 9,did not come back online, then0x16SESSION_COMMIT 0xfffffffe, then0x16So 4 of 9 boots on
20261017.20lost the sensor: three at capture time (state 9, the family already described in the #25 comment), and this one at the session commit during attach. Same driver build attaches cleanly on the other 5, so nothing about the machine, keybag or firmware has drifted.Two logging notes, since they cost time here
note_sensor_recoveries()is called fromsensor_step_failed()(sbio.rs:1797), so the garbled-frame line is attributed toSESSION_COMMITeven though the frame was discarded duringread_session_reply()a step earlier. Calling it once after the reply read would put the corruption on the step that saw it.0x16has a name (SBIO_STATUS_16,sbio.rs:4611) but no interpretation, and0xfffffffehas neither. Both are printed raw. A one-line note per status word in the refusal helper (sbio.rs:1829) would separate "enclave says no" from "the sensor exchange was corrupt".Not tested / not this
rmmod apple_sepis refused on M1, so reboot is the only re-attach path and I have not rolled it. No workaround included in this report.xart_guard: that parameter does not exist on20261017.20, and apple_sep: J316s enrolment from 11.36 fails on 7.2 under the default xART guard #269 describes a 7.2 post-match guard refusal (netmojo), which is a later stage than this.netmojo commentedon Oct 30, 2026
J316S on
linux-aurora 7.2.11.aurora9-1(7.2.11-9-1-ARCH): attach still fails on about half the boots, in two ways. The second way leaves the sensor unpatched, so every capture falls to state 9 (STATE_NEEDS_PATCH).Same board as above (
apple,j316s/apple,t6000, profileT6000/J316s),os-fw-version13.5, iBootmBoot-20457.41.3. The enrolment came from 11.36, withxart_guard=0(#269).SESSION_COMMIT refused 0xfffffffeafter a garbled read, thenREGISTER_SERIAL refused 0x16on all 5 attempts (the case above)refusing before touching the sensorsession reply read failed: ETIMEDOUT,sequence counter: session setup failed,sensor patch: sequence counter init failed before the patch fetch. Attempt 2 (stage 2) registers, and the restore and device-view proof complete.verify: the sensor fell to state 9 during the captureOn the 19:01 boot, the stage-2 retry declares the sensor online even though the patch step never ran, and nothing retries the patch, so the sensor stays at state 9.
retry_restore_proof()notes that the patch step has no retry. This boot is that case, reached throughattach_bring_sensor_online()'s retry rather than the verify-time one.Log excerpt (19:01 boot):
cosmicstasia commentedon Nov 9, 2026
Opened #435 for the two logging gaps noted above (misattributed
note_sensor_recoveries()and unlabeled0x16/0xfffffffestatuswords) — code-analysis only against
integration/aurora, not run onhardware, doesn't touch the retry ladder or session-ownership bug
itself. Posting it as a smaller mechanical piece so reproducing the
actual attach/capture failures here is easier to read in the
meantime.
overp0werj0int commentedon Nov 10, 2026
Data point from a J314s (14" M1 Pro, t6000). Touch ID fails at random on each attempt. It isn't tied to one boot: it fails and succeeds within the same boot and the same resume.
Setup
7.2.11-15-1-ARCH), aurora-touchid 20261003-2options apple_sep xart_guard=0 xart_writes=1 provision_keybag=1T6000/J316sSEP profile on this J314s. That may be intended for all T6000 machines; I'm mentioning it in case it isn't.How often: since 10-20, sudo/pkexec verifies succeeded 87 times and failed 49 times (~36% fail). Each failure falls through to the password. On the boot below, 4 of 4 verifies failed, with no suspend in between.
Boot-time restore works: 3 identities restored, "enrolment survived reboot". The failures happen afterwards, while the sensor is re-registered for each verify, before a finger can be read. I see three variants:
1. Serial read timeout during registration
(The second stage-2 registration starts 170 ms after the first, and only the second one times out.)
2. Session reply timeout, so the patch is never fetched
3. Registration succeeds, then the sensor drops to state 9 (NEEDS_PATCH) during the capture
This one fails 140 ms after the registration starts, too soon for a finger to have been read. A later attempt failed the same way after 660 ms (4376.96 → 4377.62).
Between these, the attempt at 558.5 s got through registration and armed interrupt capture (
apple-mesa spi1.0: sep sensor: data-ready IRQ 142 configured for interrupt capture). So the SPI and IRQ path works when the handshake does.Userspace effect: all three variants reach fprintd as
driver status 1(FAILED). The #1332 retry only covers status 5 (RETRY), so pam_fprintd gives up on the first failure. Re-running the command usually works within one or two tries. If the kernel can't make re-registration reliable yet, reporting these transient bring-up failures as RETRY, or retrying the re-registration once inside the driver, would hide most of them.I can collect more logs (dynamic debug, a specific
sensor_spi_mode, a test kernel) if that helps.