mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
rtw88: debug: Fix uninitialized memory in debugfs code
commit74a8c816faupstream. This code does not ensure that the whole buffer is initialized and none of the callers check for errors so potentially none of the buffer is initialized. Add a memset to eliminate this bug. Fixes:e3037485c6("rtw88: new Realtek 802.11ac driver") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/X8ilOfVz3pf0T5ec@mwanda Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
af699e99ef
commit
1015eefe10
@@ -146,6 +146,8 @@ static int rtw_debugfs_copy_from_user(char tmp[], int size,
|
||||
{
|
||||
int tmp_len;
|
||||
|
||||
memset(tmp, 0, size);
|
||||
|
||||
if (count < num)
|
||||
return -EFAULT;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user