Skip to content

Commit 87ffd21

Browse files
authored
Update cmd_extras.c
This security fix ensures that the extra settings, cannot be silently disabled, if button control enabled. So the button control setting cannot be silently (without button push) disabled, even if the user's PC is fully compromised.
1 parent 98e9b72 commit 87ffd21

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/hsm/cmd_extras.c

+4
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828
#include "mbedtls/chachapoly.h"
2929

3030
int cmd_extras() {
31+
//check button (if enabled)
32+
if (wait_button_pressed() == true) {
33+
return SW_SECURE_MESSAGE_EXEC_ERROR();
34+
}
3135
if (P1(apdu) == 0xA) { //datetime operations
3236
if (P2(apdu) != 0x0) {
3337
return SW_INCORRECT_P1P2();

0 commit comments

Comments
 (0)