mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 02:27:26 -07:00
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:
parent
b36b61feb0
commit
0655b6389e
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue