Repository navigation
soc: apple: report the boot chain record - #1344
Merged
Merged
Conversation
aura (Stage 1 and Stage 2) and U-Boot leave a record in /chosen/aurora,boot-security: one measurement@N node per item a stage handed over (stage, policy, component, verdict, sha256, key id, security version), the chain state, and what iBoot reports about the LocalPolicy that admitted Stage 1 (apple,lp-coih and related). Log the chain state at boot and expose state, the per-stage policies, lp_coih and the measurements in /sys/firmware/aurora/boot_security/. The record is the firmware's account, not a proof, so a "verified" record is reported as partial unless its first entry is an enforcing Stage 1 that verified Stage 2. Tested under QEMU (U-Boot with Secure Boot and the record, a signed UKI of a 7.3.0-aurora kernel, lockdown=integrity): the module, signed with the build key, loads and reports "aurora: boot chain partial (1 measurements, last stage u-boot/enforce)" with the U-Boot entry's sha256 equal to the UKI's; the unsigned module is refused under lockdown. checkpatch clean, W=1 clean. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…advisory APPLE_AURORA_BOOT_SECURITY_LOCKDOWN (default y when the driver is built in) raises lockdown to integrity when the boot is on the secure path: UEFI Secure Boot enforcing (the SecureBoot variable, or U-Boot's uefi-secure-boot entry in the record), or a chain the record calls verified from an enforcing Stage 1 on. A boot in audit or off mode is not locked down by it. A forged record can only add lockdown. The lockdown LSM gains lockdown_from_firmware() for this. The driver now also reports whether the record is advisory (no enforcing Stage 1 verified the next stage), the Stage 1 flavour (stage1-flavour: dev or secure) and U-Boot's Secure Boot mode (enforcing, audit, off), and measures the record into IMA as critical data (event boot-security-record). QEMU (U-Boot qemu_arm64 with Secure Boot, test keys, arm64 kernel with the driver built in, no lockdown= on the command line): enforcing U-Boot + db-signed kernel boots locked down "from UEFI Secure Boot", sysfs state partial, advisory 1, uefi_secure_boot enforcing; audit U-Boot, signed or unsigned kernel, boots with lockdown none, verdict verified / bad-signature; enforcing U-Boot refuses the unsigned kernel. The record appears in the IMA log with ima_policy=critical_data. Built as a module with W=1: clean. checkpatch clean. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rora-boot-security # Conflicts: # drivers/soc/apple/Makefile
…rora-boot-security
RyanTheTide
marked this pull request as ready for review
November 11, 2026 10:50
This was referenced Nov 11, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
drivers/soc/apple/aurora-boot-security.c(APPLE_AURORA_BOOT_SECURITY, default y on Apple) andAPPLE_AURORA_BOOT_SECURITY_LOCKDOWN(default y when the driver is built in).aura (aurora-silicon/aura#133) and U-Boot (aurora-silicon/u-boot#43) write
/chosen/aurora,boot-security: onemeasurement@Nper item a stage handed over (stage,policy=enforce|audit|off,component,verdict,sha256,key-id,security-version), the chainstate, iBoot's LocalPolicy facts (apple,lp-coih,apple,lp-smb0/1, ...), the Stage 1 build flavour (stage1-flavour=dev|secure) and U-Boot's Secure Boot mode (uefi-secure-boot=enforcing|audit|off). The driver:aurora: boot chain <state>[, advisory] (<n> measurements, last stage <stage>/<policy>, stage1 <flavour>, uefi secure boot <mode>, lockdown from it: <reason|no>)at boot;/sys/firmware/aurora/boot_security/{state,advisory,policy,stage1_flavour,uefi_secure_boot,lockdown,lp_coih,measurements};verifiedrecord aspartialunless an enforcing Stage 1 verified the next stage, andadvisory= 1 in that case, since a stage nobody verified can write anything into the record;aurora-boot-security, eventboot-security-record).Lockdown on the secure path (
APPLE_AURORA_BOOT_SECURITY_LOCKDOWN): lockdown is raised to integrity when UEFI Secure Boot is enforcing (theSecureBootvariable, or U-Boot'suefi-secure-boot = "enforcing"in the record) or the record's chain is verified from an enforcing Stage 1 on, the equivalent of lockdown under UEFI Secure Boot on other platforms. Boots in audit or off mode are not locked down by it;lockdown=on the command line still applies. A forged record can only add lockdown. The lockdown LSM gainslockdown_from_firmware()for this.No node, or a node without
compatible = "aurora,boot-security-v1": no sysfs files; the Secure Boot lockdown check still runs.Tests (QEMU
virt,-cpu max, U-Bootqemu_arm64_defconfig+apple_secboot.configwith test keys):lockdown=on the command line:Kernel is locked down from UEFI Secure Boot,/sys/kernel/security/lockdown=[integrity],statepartial,advisory1,uefi_secure_bootenforcing,measurements=u-boot enforce efi-image verified <sha256>;[none],uefi_secure_bootaudit, verdictverified/bad-signature,stateunverified;ima_policy=critical_datathe IMA log has theboot-security-recordentry.lockdown=integrity; the same module unsigned is refused.W=1clean;checkpatch.plclean.Hardware (M2 MacBook Air, this driver on the 7.3.0 base it targets, Stage 2 and U-Boot as one-shot trials from aura#133 / u-boot#43, test keys):
[none].aurora: boot chain unverified, advisory (2 measurements, last stage stage2/off, ...);stateunverified,advisory1,lockdownno,stage1_flavourunknown;/sys/kernel/security/lockdown[none].Kernel is locked down from UEFI Secure Boot,/sys/kernel/security/lockdown[integrity],statepartial,uefi_secure_bootenforcing, U-Boot entryverifiedwith the UKI's sha256. The Mac boots to its desktop with 0 failed units, SELinux enforcing, no AVC denials; the only lockdown messages are hibernation and a/dev/memopen by a udev worker being refused.[none],uefi_secure_bootaudit.integration/aurora(only conflict:drivers/soc/apple/Makefile).🤖 Generated with Claude Code