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:Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/Ysg14NdKAZF/hcNG@kili Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Zheng Zengkai <zhengzengkai@huawei.com> Reviewed-by:
Wei Li <liwei391@huawei.com>
Loading
Please sign in to comment