Skip to content

Apply the StrongBox instance's own attestation-version ceiling - #318

Draft
JingMatrix wants to merge 1 commit into
devfrom
fix/strongbox-attestation-version
Draft

JingMatrix wants to merge 1 commit into
devfrom
fix/strongbox-attestation-version

Conversation

@JingMatrix

@JingMatrix JingMatrix commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

WIP — builds, but the open questions below are unsettled and no log exercises the new path yet.

StrongBox is a separate HAL service with its own declared version, and may sit generations below the TEE's: the Pixel 11 in #310 declares KeyMint 6 for default and 4 for strongbox. With no working hardware the push path reused the TEE's fabricated version, so that device attested StrongBox keys at 500 against a declared 400: the one thing check_attestation_version forbids, while reporting below it allows explicitly. presentedStrongBoxVersion now caps the TEE figure by the strongbox instance's own ceiling.

Two smaller defects go with it. The clamp borrowed default's constraint when no strongbox instance was declared, which can only over-estimate; it now borrows only an EXACT Keymaster mapping both levels share. And it overwrote the capture instead of recording an override, so harvested.json claimed a capture of 200 where the harvest captured 300.

Across the logs I have: #310 fixed, #279, #313 and lvyin555's OnePlus unchanged.

Open: strongBoxAttestationVersion joined SYNTHESIZED_FIELDS, adding an editable WebUI row; and the fallback still hardcodes 300, legal but below cert.rs's MODULE_HASH gate of 400.

StrongBox is a separate HAL service declaring its own version -- a Pixel 11 declares KeyMint 6 for
'default' and 4 for 'strongbox' -- but with no working hardware the push path reused the TEE's
fabricated version outright, so StrongBox keys attested 500 against a declared 400. That is the one
thing check_attestation_version forbids; reporting below a declared version it allows explicitly.
presentedStrongBoxVersion now caps the TEE figure by the strongbox instance's own ceiling.

The clamp no longer borrows a CEILING from 'default', only an EXACT Keymaster mapping that both
levels genuinely share, and it records its result as an override rather than overwriting the
capture -- harvested.json claimed the device captured 200 where it captured 300. The log names the
instance the figure came from.
@JingMatrix
JingMatrix force-pushed the fix/strongbox-attestation-version branch from df106e8 to 3a70522 Compare October 19, 2026 17:52
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