Commit ae14e61b authored by Dan Carpenter's avatar Dan Carpenter Committed by Zheng Zengkai
Browse files

wifi: wil6210: debugfs: fix info leak in wil_write_file_wmi()

stable inclusion
from stable-v5.10.137
commit 05ceda14ef7c73104e709c414c3680d8a59f51d4
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I60PLB

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=05ceda14ef7c73104e709c414c3680d8a59f51d4



--------------------------------

[ Upstream commit 7a483656 ]

The simple_write_to_buffer() function will succeed if even a single
byte is initialized.  However, we need to initialize the whole buffer
to prevent information leaks.  Just use memdup_user().

Fixes: ff974e40 ("wil6210: debugfs interface to send raw WMI command")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/Ysg14NdKAZF/hcNG@kili


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: default avatarWei Li <liwei391@huawei.com>
parent 83c027e9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment