oxidecomputer / oxidecomputer/bootleby
Update CFPA's IMAGE_KEY_REVOKE if bootleby and both slots have a newer revocation ID
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Signed images pack a 16-bit uniary revocation ID into the signer's certificate serial number. NXP ROM compares this value against CFPA's IMAGE_KEY_REVOKE. Signed images are only considered valid if their revocation IDs exactly match IMAGE_KEY_REVOKE or are the next valid value (IMAGE_KEY_REVOKE+1 in uniary).
NXP ROM does not update IMAGE_KEY_REVOKE on its own but leaves it up to the booted image. This avoids a scenario where a valid, signed image is flashed that has IMAGE_KEY_REVOKE+1 but that image fails to boot. When using only the NXP ROM, this would require external intervention to recover (assuming the ISP or SWD interfaces are even enabled).
With bootleby, we already use A/B slots. Assuming the main image only updates one slot at a time (i.e. it never flashes the slot it is running from), then the only way we end up with a newer revocation ID in both slots is if bootleby and at least one of the slots has booted successfully. If that's the case, bootleby could go ahead and update IMAGE_KEY_REVOKE.
Concretely, if bootleby's own revocation ID and both slots' revocation IDs all match and are the next valid IMAGE_KEY_REVOKE, bootleby should go ahead and update IMAGE_KEY_REVOKE.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how bootleby obtains its revocation ID, validates both A/B slots, and updates CFPA's IMAGE_KEY_REVOKE; the issue names no files or tests. Done means IMAGE_KEY_REVOKE is updated only when bootleby and both slots have matching IDs equal to the next valid value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- embedded-iot, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100