mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
random: Fix random_get_bytes() with CONFIG_FIPS=y
The bytes pointer was not reset back to the beginning of the buffer when mixing in additional entropy from the crypto module. This resulted in writing beyond the return buffer and not getting the required mixing of the extra entropy for the actual return buffer. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
3b86d77bae
commit
f413eb03d9
@ -181,6 +181,7 @@ int random_get_bytes(void *buf, size_t len)
|
||||
|
||||
#ifdef CONFIG_FIPS
|
||||
/* Mix in additional entropy from the crypto module */
|
||||
bytes = buf;
|
||||
left = len;
|
||||
while (left) {
|
||||
size_t siz, i;
|
||||
|
Loading…
Reference in New Issue
Block a user