]> git.itanic.dy.fi Git - linux-stable/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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 08:55:11 +0000 (09:55 +0100)
commit1c4a2e9ab2599c5bf1dc02a69fa85d64c5027fea
tree8b6579d9a1e4ad7a6035c689e25d026c1d546d4b
parenteca79d8158e8c7f06914fa45b4dff95214272664
ath6kl: wmi: prevent a shift wrapping bug in ath6kl_wmi_delete_pstream_cmd()

[ Upstream commit 6a950755cec1a90ddaaff3e4acb5333617441c32 ]

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: 8fffd9e5ec9e ("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
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/ath/ath6kl/wmi.c