Skip to content

soc: apple: sep: describe what SEP_BIO_REARM does with its secret - #2885

Merged
RyanTheTide merged 1 commit into
integration/aurorafrom
sec/sep-rearm-doc
Nov 23, 2026
Merged

RyanTheTide merged 1 commit into
integration/aurorafrom
sec/sep-rearm-doc

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

Problem

The UAPI comment on SEP_BIO_REARM says the password passed in is used to unwrap a re-arm record. The driver does not do that: it copies the secret in and wipes it unused, and ends the enclave's lockout with the stored secret of the configured user's key bag. The comment also does not say that the failed attempts, the lockout and the wait for the first password since boot are kept once for the machine.

Change

Comment only: describe what the ioctl does with the secret and that its state is machine-wide, so a caller does not rely on the kernel to check the password or to scope the re-arm to one account. No ABI or behaviour change.

Testing

  • Header only; make headers / UAPI header test build unaffected (no declarations changed).

Assisted-by: LLM (Claude:Opus 5.5)

The comment on SEP_BIO_REARM says the password is used to unwrap a
re-arm record. It is not: the driver copies the secret in and wipes it
unused, and ends the enclave's lockout with the stored secret of the
configured user's key bag. The failed attempts, the lockout and the
wait for the first password since boot are also kept once for the
machine, not per account.

Describe that, so that a caller does not rely on the kernel to check
the password or to scope the re-arm to one account. No change to the
ABI or to what the ioctl does.

Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Review at 3f67ead (non-author). The new text matches drivers/soc/apple/sbio.rs on integration/aurora:

  • rearm_after_password() ignores its _password argument.
  • bio_after_boot, bio_lockout and bio_nomatch_streak are single device-wide fields.
  • The enclave-side clear goes through clear_enclave_lockout() with the stored key-bag secret of the one SBIO_PROBE_USER_ID domain.

Optional precision: "the configured user's key bag" could say "the key bag of the single Touch ID user domain", since the code uses SBIO_PROBE_USER_ID rather than a per-account lookup. No declaration changes, so the UAPI header test is unaffected. No blocker.

Assisted-by: LLM (Claude:Opus 5.5)

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formal §1–§6 review at 3f67ead4c2c8.

  • Accuracy: Verified against drivers/soc/apple/sbio.rs on integration/aurora:
    • rearm_after_password() ignores _password (copied in and wiped unused).
    • bio_after_boot, bio_lockout, and bio_nomatch_streak are single device-wide atomics (not per-account).
    • clear_enclave_lockout() unlocks via DesignateUser::new(SBIO_PROBE_USER_ID) and stored.secret().
  • §1–§6: Comment-only UAPI documentation fix (include/uapi/linux/apple-sep.h), zero ABI/declaration changes, no model gates, clean-room, human commit/committer + Signed-off-by with zero AI trailers in commit and Assisted-by: in PR body, no forbidden naming.
  • CI: All 7/7 checks green (host-tests, kunit, source, rust-build, DWC3/ATC x3).

No blockers. Approved.

Assisted-by: LLM (Gemini 4 Neon)

@RyanTheTide
RyanTheTide merged commit 6732e74 into integration/aurora Nov 23, 2026
7 checks passed
@RyanTheTide
RyanTheTide deleted the sec/sep-rearm-doc branch November 27, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants