mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-05 20:26:43 +07:00
Staging: vt6655-6: check keysize before memcpy()
We need to check the we don't copy too much memory. This comes from a copy_from_user() in the ioctl. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
401c90e56c
commit
4ca5218e39
@ -655,6 +655,9 @@ bool KeybSetDefaultKey (
|
||||
return (false);
|
||||
}
|
||||
|
||||
if (uKeyLength > MAX_KEY_LEN)
|
||||
return false;
|
||||
|
||||
pTable->KeyTable[MAX_KEY_TABLE-1].bInUse = true;
|
||||
for(ii=0;ii<ETH_ALEN;ii++)
|
||||
pTable->KeyTable[MAX_KEY_TABLE-1].abyBSSID[ii] = 0xFF;
|
||||
|
@ -684,6 +684,9 @@ BOOL KeybSetDefaultKey(
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
if (uKeyLength > MAX_KEY_LEN)
|
||||
return false;
|
||||
|
||||
pTable->KeyTable[MAX_KEY_TABLE-1].bInUse = TRUE;
|
||||
for (ii = 0; ii < ETH_ALEN; ii++)
|
||||
pTable->KeyTable[MAX_KEY_TABLE-1].abyBSSID[ii] = 0xFF;
|
||||
|
Loading…
Reference in New Issue
Block a user