wil6210: use after free in wil_netif_rx_any()
Subsystems (2)
PATCH 1/1 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 f99fe49ff372 ("wil6210: add wil_netif_rx() helper function")
Signed-off-by Dan Carpenter <[email protected]>
--- drivers/net/wireless/ath/wil6210/txrx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/wil6210/txrx.c +1 -1
@@ -1012,11 +1012,11 @@ void wil_netif_rx_any(struct sk_buff *skb, struct net_device *ndev)skb_orphan (skb);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); ndev->stats.rx_dropped++; stats->rx_replay++; stats->rx_dropped++; -wil_dbg_txrx (wil,"Rx drop %d bytes\n" , skb->len);return ; }
Signature · 1 line
2.20.1
Quoted 5 lines · Dan Carpenter
The debug code dereferences "skb" to print "
skb->len" so we have to print the message before we free "skb".Fixes f99fe49ff372 ("wil6210: add wil_netif_rx() helper function")Signed-off-by Dan Carpenter <[email protected]>
As this is a regression starting from v5.4-rc1, I'll queue this to v5.4.
Signature · 1 line
Kalle Valo
Quoted 5 lines · Dan Carpenter
The debug code dereferences "skb" to print "
skb->len" so we have to print the message before we free "skb".Fixes f99fe49ff372 ("wil6210: add wil_netif_rx() helper function")Signed-off-by Dan Carpenter <[email protected]>
Patch applied to wireless-drivers.git, thanks.
2b481835cf4e wil6210: use after free in wil_netif_rx_any()
Signature · 3 lines
https://patchwork.kernel.org/patch/11155359/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches