]> git.baikalelectronics.ru Git - kernel.git/commit
ath6kl: wmi: prevent a shift wrapping bug in ath6kl_wmi_delete_pstream_cmd()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 18 Sep 2020 14:27:32 +0000 (17:27 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 22 Sep 2020 07:46:46 +0000 (10:46 +0300)
commit15b5da7989b6712d21b3bf677d8c5bca6d52ce9d
tree1e9c7eba23a964ee60dcc4d7b7530d4728d1136d
parent5a2def6f6cd4182ed9922958559a9c9549bdcade
ath6kl: wmi: prevent a shift wrapping bug in ath6kl_wmi_delete_pstream_cmd()

The "tsid" is a user controlled u8 which comes from debugfs.  Values
more than 15 are invalid because "active_tsids" is a 16 bit variable.
If the value of "tsid" is more than 31 then that leads to a shift
wrapping bug.

Fixes: 018f17cf8cf9 ("ath6kl: Implement support for QOS-enable and QOS-disable from userspace")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200918142732.GA909725@mwanda
drivers/net/wireless/ath/ath6kl/wmi.c