]> git.baikalelectronics.ru Git - kernel.git/commit
wifi: wil6210: debugfs: fix info leak in wil_write_file_wmi()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 15 Jul 2022 10:35:18 +0000 (13:35 +0300)
committerKalle Valo <quic_kvalo@quicinc.com>
Mon, 18 Jul 2022 10:04:11 +0000 (13:04 +0300)
commitd248abd379abe1cf5dac2700fcedaea0d453c96d
tree0ef3d708f58e2cf65c63f48c804ec47e0866d3b0
parent5486c2dc2901c489e9cec776313234694288db1f
wifi: wil6210: debugfs: fix info leak in wil_write_file_wmi()

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: e176ba5ffdf8 ("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
drivers/net/wireless/ath/wil6210/debugfs.c