]> git.baikalelectronics.ru Git - kernel.git/commit
staging: rtl8192e: Fix potential use-after-free in rtllib_rx_Monitor()
authorYueHaibing <yuehaibing@huawei.com>
Wed, 23 Nov 2022 08:12:53 +0000 (16:12 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:41:25 +0000 (11:41 +0100)
commit5c4f55bafc84c03169bd82556a2de0637bfaeed1
treec7f0bb697fa741e3003827f707d6fd6a443e84e0
parent10c6800867829c7ea25def21812f30173f4f8822
staging: rtl8192e: Fix potential use-after-free in rtllib_rx_Monitor()

[ Upstream commit a76ba50e94ce779473ecd4a5f98e892ad52d73b2 ]

The skb is delivered to netif_rx() in rtllib_monitor_rx(), which may free it,
after calling this, dereferencing skb may trigger use-after-free.
Found by Smatch.

Fixes: 08b1c91be271 ("From: wlanfae <wlanfae@realtek.com> [PATCH 1/8] rtl8192e: Import new version of driver from realtek")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20221123081253.22296-1-yuehaibing@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/staging/rtl8192e/rtllib_rx.c