Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Triple call CFI Counter reset when seeding the prng #921

Closed
andreslagarcavilla opened this issue Oct 6, 2023 · 0 comments · Fixed by #954
Closed

Triple call CFI Counter reset when seeding the prng #921

andreslagarcavilla opened this issue Oct 6, 2023 · 0 comments · Fixed by #954
Assignees
Labels
Caliptra v1.0 Items required for v1.0 Release High ROM Issue affects ROM security/countermeasure
Milestone

Comments

@andreslagarcavilla
Copy link
Collaborator

From Nick Galloway (gallowayn@google.com)

Affter RomEnv has been created, cfi_counter::CfiCounter::reset() is called to seed the prng for the CfiCounter. That function is marked with #[inline(never)], but it should instead be always inlined and called multiple times (say, three) so that it's harder to glitch past the prng seed from the trng. To successfully exploit this would require the ability to successfully glitch past the current non-inlined prng seed and then also a second time to glitch past something else (say FMC signing checks). After the initial prng seed all of the delays would be deterministic because the initial state of the Xoshiro128 prng is itself deterministic, so this should be straightforward for someone able to glitch twice on a single run.

@andreslagarcavilla andreslagarcavilla added this to the 0p9 milestone Oct 6, 2023
@andreslagarcavilla andreslagarcavilla added ROM Issue affects ROM security/countermeasure Caliptra v1.0 Items required for v1.0 Release High labels Oct 6, 2023
mhatrevi added a commit that referenced this issue Oct 13, 2023
This fix addresses issue# #920 and #921
@mhatrevi mhatrevi linked a pull request Oct 13, 2023 that will close this issue
mhatrevi added a commit that referenced this issue Oct 13, 2023
This fix addresses issue# #920 and #921
mhatrevi added a commit that referenced this issue Oct 13, 2023
This fix addresses issue# #920 and #921
mhatrevi added a commit that referenced this issue Oct 13, 2023
This fix addresses issue# #920 and #921
mhatrevi added a commit that referenced this issue Oct 19, 2023
This fix addresses issue# #920 and #921
mhatrevi added a commit that referenced this issue Oct 20, 2023
This fix addresses issue# #920 and #921

This fix also hardens the CFI RNG initialization by providing an additional source of entrophy.
mhatrevi added a commit that referenced this issue Oct 20, 2023
This fix addresses issue# #920 and #921

This fix also hardens the CFI RNG initialization by providing an additional source of entrophy.
mhatrevi added a commit that referenced this issue Oct 20, 2023
This fix addresses issue# #920 and #921

This fix also hardens the CFI RNG initialization by providing an additional source of entrophy.
mhatrevi added a commit that referenced this issue Oct 20, 2023
This fix addresses issue# #920 and #921

This fix also hardens the CFI RNG initialization by providing an additional source of entrophy.
mhatrevi added a commit that referenced this issue Oct 20, 2023
This fix addresses issue# #920 and #921

This fix also hardens the CFI RNG initialization by providing an additional source of entrophy.
mhatrevi added a commit that referenced this issue Oct 20, 2023
This fix addresses issue# #920 and #921

This fix also hardens the CFI RNG initialization by providing an additional source of entrophy.
korran pushed a commit to korran/caliptra-sw that referenced this issue Oct 23, 2023
This fix addresses issue# chipsalliance#920 and chipsalliance#921

This fix also hardens the CFI RNG initialization by providing an additional source of entrophy.
mhatrevi added a commit that referenced this issue Oct 24, 2023
This fix addresses issue# #920 and #921

This fix also hardens the CFI RNG initialization by providing an additional source of entropy.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Caliptra v1.0 Items required for v1.0 Release High ROM Issue affects ROM security/countermeasure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants