]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wifi: mwifiex: Sanity check tlv_len and tlv_bitmap_len
authorGustavo A. R. Silva <gustavoars@kernel.org>
Fri, 25 Aug 2023 03:10:45 +0000 (21:10 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Oct 2023 09:59:00 +0000 (11:59 +0200)
commit6063f6f64fa4f156613b1feee1deb0fadc0e7a16
tree071b911549ab4468117cb47630b4a033d225b088
parent59ebfeb7b319b0a942e09ddf3c7c6e11c8de7db3
wifi: mwifiex: Sanity check tlv_len and tlv_bitmap_len

[ Upstream commit d5a93b7d2877aae4ba7590ad6cb65f8d33079489 ]

Add sanity checks for both `tlv_len` and `tlv_bitmap_len` before
decoding data from `event_buf`.

This prevents any malicious or buggy firmware from overflowing
`event_buf` through large values for `tlv_len` and `tlv_bitmap_len`.

Suggested-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/d4f8780527d551552ee96f17a0229e02e1c200d1.1692931954.git.gustavoars@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c