wil6210: use after free in wil_netif_rx_any()
The debug code dereferences "skb" to print "skb->len" so we have to
print the message before we free "skb".
Fixes: f99fe49ff3
("wil6210: add wil_netif_rx() helper function")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
fddbfeece9
commit
2b481835cf
@ -1012,11 +1012,11 @@ void wil_netif_rx_any(struct sk_buff *skb, struct net_device *ndev)
|
|||||||
skb_orphan(skb);
|
skb_orphan(skb);
|
||||||
|
|
||||||
if (security && (wil->txrx_ops.rx_crypto_check(wil, skb) != 0)) {
|
if (security && (wil->txrx_ops.rx_crypto_check(wil, skb) != 0)) {
|
||||||
|
wil_dbg_txrx(wil, "Rx drop %d bytes\n", skb->len);
|
||||||
dev_kfree_skb(skb);
|
dev_kfree_skb(skb);
|
||||||
ndev->stats.rx_dropped++;
|
ndev->stats.rx_dropped++;
|
||||||
stats->rx_replay++;
|
stats->rx_replay++;
|
||||||
stats->rx_dropped++;
|
stats->rx_dropped++;
|
||||||
wil_dbg_txrx(wil, "Rx drop %d bytes\n", skb->len);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user