Skip to content

soc: apple: sep: fail key operations when credential disposal fails - #2048

Open
cameroncooper wants to merge 1 commit into
aurora-silicon:integration/aurorafrom
cameroncooper:review/sep-disposal-fail-closed
Open

cameroncooper wants to merge 1 commit into
aurora-silicon:integration/aurorafrom
cameroncooper:review/sep-disposal-fail-closed

Conversation

@cameroncooper

@cameroncooper cameroncooper commented Nov 16, 2026 •

Copy link
Copy Markdown

A password-authorized SEP_KEY_SIGN_PASSWORD or SEP_KEY_UNSEAL_PASSWORD creates an unlock evaluation in the enclave and deletes it afterwards. The deletion's answer was ignored, so a result could be returned while the credential context it was authorized by might still be live.

This confirms the deletion before a result leaves the driver and discards the result if it fails. An unconfirmed deletion latches private key operations off until the driver restarts (a reboot or module reload); SEP_KEY_GET_INFO and SEP_KEY_CANCEL stay available. This is the "unconfirmed credential disposal" case that warrants a quarantine; ordinary refusals, misses and cancellations are unaffected.

Tests

  • KUnit (apple_sep_key_one_op): two new cases drive the production guard for success, early exits and a failed deletion, checking that the result is destroyed and that deletion is attempted exactly once.
  • Host test tools/aurora-sep/tests/test_key_context_cleanup.py (same pattern as test_refkey_seal_admission.py), added to the sep-source workflow.
  • test_log_ratelimit.py passes; the module builds for arm64 with no new warnings.

Hardware

  • J293 (MacBook Pro 13-inch, M1): password-authorized sign and unseal unchanged in normal use. The failure path has not been forced on hardware.

🤖 Generated with Claude Code

@cameroncooper

Copy link
Copy Markdown
Author

@RyanTheTide, could you approve CI on #2048–#2051? They're my first PRs here, so SEP source checks and Host tests are waiting for a maintainer.

They replace #1004, retargeted to integration/aurora as you asked. #2049 stacks on your #1824. KUnit passes locally on arm64 QEMU, and the J293 results are in each description.

A password-authorized sign or unseal creates an unlock evaluation in
the enclave and deletes it afterwards. The deletion's answer was
ignored, so a result could be returned while the credential context it
was authorized by might still be live.

Confirm the deletion before a result leaves the driver, and discard the
result if it fails. An unconfirmed deletion latches key operations off
until the driver restarts (a reboot or a module reload), so nothing
later runs against a context that may still hold the credential;
capability queries and cancellation stay available meanwhile.

The KUnit cases and the host test run the production guard for
success, early exits and a failed deletion, checking that the result is
destroyed and that deletion is attempted exactly once.

Assisted-by: LLM [Claude Code, claude-opus-5-5]
Signed-off-by: Cameron Cooper <c@meron.cc>
@cameroncooper
cameroncooper force-pushed the review/sep-disposal-fail-closed branch from fd781ee to 7723f3d Compare November 16, 2026 20:23
@cameroncooper
cameroncooper marked this pull request as ready for review November 16, 2026 20:24
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