]> 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 10:03:10 +0000 (12:03 +0200)
commiteb7ae9ed63c6f92e714260f373559c73ee4bab89
treeda5ad624d39ecebe5c8d32b592bcecb3875ecf66
parentb812b31696287049fad7d65a26d12bc4c2122c72
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