cmdhfseos: fix stack buffer overflow in select_DF_verify
increased CMAC buffer size, otherwise memset in aes_cmac writes 16-bytes to 8-byte buffer
This commit is contained in:
1 parent
b36b61feb0
commit
0655b6389e
1 file changed
+1
-1
@@ -562,7 +562,7 @@ static int select_DF_verify(uint8_t *response, uint8_t response_length, uint8_t
|
||||
}
|
||||
|
||||
// ----------------- MAC Key Generation -----------------
|
||||
uint8_t cmac[8];
|
||||
uint8_t cmac[16];
|
||||
uint8_t MAC_key[24] = {0x00};
|
||||
memcpy(MAC_key, keys[key_index].privMacKey, 16);
|
||||
create_cmac(MAC_key, input, cmac, sizeof(input), encryption_algorithm);
|
||||
|
||||
Reference in new issue
Block a user