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

Cutting power while verifying PIN code wipes the device. #229

Open
stepansnigirev opened this issue Nov 15, 2022 · 0 comments
Open

Cutting power while verifying PIN code wipes the device. #229

stepansnigirev opened this issue Nov 15, 2022 · 0 comments
Labels

Comments

@stepansnigirev
Copy link
Collaborator

stepansnigirev commented Nov 15, 2022

As the device is writing to the filesystem during PIN verification, cutting off the power can cause damage of the flash FS.

It can be mitigated if we split the flash to 2 parts, write data to the second part, and copy it to the first part when we are done.

This approach can be abused for an attack though - if the attacker bruteforces the PIN and cuts the power every time PIN verification fails he could rewind the device to the previous state. So we have to be very-very careful when implementing this.

Probably copying back and forth should be done in a few iterations to make sure we don't open an opportunity for such an attack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant