Skip to content

soc: apple: sep: list the enclave's Touch ID identities per user (GetIdentitiesList 0x6e) - #1158

Draft
RyanTheTide wants to merge 1 commit into
feat/sep-touchid-token-clocksfrom
feat/sep-touchid-identities-list
Draft

RyanTheTide wants to merge 1 commit into
feat/sep-touchid-token-clocksfrom
feat/sep-touchid-identities-list

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

The first multi-user step, read-only. macOS reconciles its users' Touch ID identities with GetIdentitiesList (0x6e).

  • Request: a 4-byte signed user filter; -1 means every user.
  • Reply: N * 20 bytes, each record the owning user plus the identity UUID, at most 600 bytes (30 records). Empty is a user with no identities. Layout and bounds are from Daybreak t-5618 and our own macOS 11-04 user-removal capture.

This PR adds the request, a strict parser (it rejects a partial record or more than 600 bytes), and a boot-time inventory after the restore: how many identities the enclave holds for the Touch ID user and how many belong to other users of the shared enclave (macOS's users). It logs counts only; UUIDs are never logged.

Not in this PR: whole-user removal (RemoveUserData, 0x3c). It is destructive and needs an explicit admin path, a fresh 0x6e inventory, no live capture, backups and catacomb save handling, so it waits for a design review.

Stacked on #1145. It is independent of #1145's code, but touches the same file.

Testing

  • checkpatch --strict 0/0.
  • KUnit identities_list_replies_parse: empty reply, two records, a partial record, the 600-byte bound, 30 records.
  • Neo: the short-clock test build (fleet22-tid28t) carries it; the boot inventory will be posted here.

🤖 Generated with Claude Code

macOS reconciles its users' Touch ID identities with GetIdentitiesList
(0x6e): a four-byte user filter, -1 for every user, answered by 20-byte
records of the owning user and the identity's UUID, at most 600 bytes.
It is read-only, and it is the first step towards more than one Linux
user: it tells which enclave identities belong to whom, where the
existing LIST_IDENTITIES only lists the device view.

Add the request and a strict reply parser, and after a restore log how
many identities the enclave holds for the Touch ID user and for other
users of the shared enclave (another OS's users). Counts only; identity
UUIDs are never logged.

Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
Assisted-by: LLM
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

TID10 scope note: real multi-user needs one enclave user per Unix account, each with its own key bag. That is #921's design and is not started; #921 is a design draft. 0x3c RemoveUserData then comes on account removal, behind an explicit root-only admin request with these guards: a fresh 0x6e inventory, no live capture, backups, catacomb saves, a re-list, and only then the host cleanup. This PR is step 1, the read-only inventory. The Neo powered off at 02:06 (thermal trip in another lane's trial), so the boot inventory runs on the short-clock test build once Ryan powers it on.

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.

1 participant