mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-16 07:35:14 +00:00
staging: rtl8192e: Fix potential use-after-free in rtllib_rx_Monitor()
[ Upstream commitd30f4436f3
] 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:94a799425e
("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>
This commit is contained in:
parent
b0aaec894a
commit
31bfe024a9
1 changed files with 1 additions and 1 deletions
|
@ -1489,9 +1489,9 @@ static int rtllib_rx_Monitor(struct rtllib_device *ieee, struct sk_buff *skb,
|
|||
hdrlen += 4;
|
||||
}
|
||||
|
||||
rtllib_monitor_rx(ieee, skb, rx_stats, hdrlen);
|
||||
ieee->stats.rx_packets++;
|
||||
ieee->stats.rx_bytes += skb->len;
|
||||
rtllib_monitor_rx(ieee, skb, rx_stats, hdrlen);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue