]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wifi: mwifiex: avoid possible NULL skb pointer dereference
authorDmitry Antipov <dmantipov@yandex.ru>
Mon, 14 Aug 2023 09:49:57 +0000 (12:49 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Sep 2023 08:46:55 +0000 (10:46 +0200)
commitd155c5f64cefacdc6a9a26d40be53ee2903c28ff
tree143e5ac699a3a1282b6767c7a4c6c8356aedc93a
parent531cb8c9c1132d10ae488354cb85dc8eaf9ba89c
wifi: mwifiex: avoid possible NULL skb pointer dereference

[ Upstream commit 35a7a1ce7c7d61664ee54f5239a1f120ab95a87e ]

In 'mwifiex_handle_uap_rx_forward()', always check the value
returned by 'skb_copy()' to avoid potential NULL pointer
dereference in 'mwifiex_uap_queue_bridged_pkt()', and drop
original skb in case of copying failure.

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

Fixes: 838e4f449297 ("mwifiex: improve uAP RX handling")
Acked-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230814095041.16416-1-dmantipov@yandex.ru
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/marvell/mwifiex/uap_txrx.c