Skip to content

Harden dev mode value - #56

Open
diondokter wants to merge 2 commits into
OpenDevicePartnership:mcxa-secure-bootfrom
diondokter:devmode-sensitivity
Open

diondokter wants to merge 2 commits into
OpenDevicePartnership:mcxa-secure-bootfrom
diondokter:devmode-sensitivity

Conversation

@diondokter

Copy link
Copy Markdown
Member

Supercedes #54

Instead of collapsing dev mode into a bool, we keep it a very specific u32.

The secure_boot_cfg is also read twice.
This hopefully hardens against fault injections that saturate registers.
Everything after that uses a u32 that when saturated will not enable dev mode, so that should be good

Comment thread libs/ec-slimloader-mcxa/src/board.rs Resolved
Comment thread libs/ec-slimloader-mcxa/src/board.rs Resolved
Comment thread libs/ec-slimloader-mcxa/src/board.rs Resolved
Comment thread libs/ec-slimloader-mcxa/src/board.rs Resolved
Comment thread libs/ec-slimloader-mcxa/src/board.rs Resolved
@alamfarjadf

Copy link
Copy Markdown

#55 (comment)

And last open question / concern, but IMO not sure what else can be done (other than doing a check asm again, but where do we draw the line)

@jerrysxie jerrysxie added this to EC Oct 22, 2026
@jerrysxie jerrysxie moved this to In Progress in EC Oct 22, 2026
@jerrysxie
jerrysxie requested a review from JamesHuard October 22, 2026 15:51
@alamfarjadf

Copy link
Copy Markdown

@felipebalbi @diondokter would 0b11111100_11111100_00000011_11111100 work for the pattern? Basically !OnlyPki when computing and if it matches, we know OnlyPki not set (DEV mode can be enabled).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

3 participants