wifi: ath9k: don't allow to overwrite ENDPOINT0 attributes
authorFedor Pchelkin <pchelkin@ispras.ru>
Wed, 17 May 2023 15:03:17 +0000 (18:03 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Jul 2023 14:21:07 +0000 (16:21 +0200)
commit09740fa9827cfbaf23ecd041e602a426f99be888
tree55603791207c74e45a7bbaa7eebda8dd864e118f
parent0d89e50952b5be640ed0027dd0f737eaba08e3b4
wifi: ath9k: don't allow to overwrite ENDPOINT0 attributes

[ Upstream commit 061b0cb9327b80d7a0f63a33e7c3e2a91a71f142 ]

A bad USB device is able to construct a service connection response
message with target endpoint being ENDPOINT0 which is reserved for
HTC_CTRL_RSVD_SVC and should not be modified to be used for any other
services.

Reject such service connection responses.

Found by Linux Verification Center (linuxtesting.org) with Syzkaller.

Fixes: fb9987d0f748 ("ath9k_htc: Support for AR9271 chipset.")
Reported-by: syzbot+b68fbebe56d8362907e8@syzkaller.appspotmail.com
Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20230516150427.79469-1-pchelkin@ispras.ru
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/ath/ath9k/htc_hst.c