-
Notifications
You must be signed in to change notification settings - Fork 235
Fixed security counter overflow detected to late #493
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
base: main
Are you sure you want to change the base?
Fixed security counter overflow detected to late #493
Conversation
Note: I have not added nrf squash! as there does not seem to be a noup commit this could be reasonably squashed with. The only noup which changes code related to the security counter seems to be bf14385 but the issue it addresses is unrelated. Also, I wasn't able to find a way to put this fix upstream. The fix needs a function like the added |
ae1e5e8
to
b92b3c3
Compare
e72e0b7
to
6fd7e24
Compare
Use a hook |
The reason I was hesitant to use a hook is that all other functions from https://github.com/nrfconnect/sdk-mcuboot/blob/main/boot/bootutil/include/bootutil/security_cnt.h are not hooks although they are exactly part of the same functionality and also defined in NCS. If In this case should I:
|
I would update the upstream API. Untill that it can be [nrf noup] patch. rationale:
|
c8f424d
to
3065af5
Compare
8166c65
to
0f78c6c
Compare
0f78c6c
to
7c98883
Compare
…late This commit fixes the issue, occuring when the maximum amount of security counter updates has been reached. This fact was only detected after a permament update already happened - the updated firmware was unable to boot, as it failed when trying to update the security counter after the permament swap. This commit adds the check if the security counter can be updated (i. e. free security counter slots are still available) before the swap is performed, fixing the issue. Signed-off-by: Artur Hadasz <[email protected]> (cherry picked from commit fe8f9fc07a3b01e239fa2e999615227fa314520a)
This commit sets the MCUBOOT_HW_DOWNGRADE_PREVENTION_COUNTER_LIMITED by default for platforms which support the security counter. Signed-off-by: Artur Hadasz <[email protected]>
7c98883
to
05e0add
Compare
|
This commit fixes the issue, occuring when the maximum amount of security counter updates has been reached.
This fact was only detected after a permament update already happened - the updated firmware was unable to boot, as it failed when trying to update the security counter after the permament swap.
This commit adds the check if the security counter can be updated (i. e. free security counter slots are still available) before the swap is performed, fixing the issue.