Skip to contentSkip to conversation

r8169: fix kasan reported skb use-after-free.

PATCH In review Francois Romieu 2 participants 2 messages Nov 11, 2015 – Nov 12, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 r8169: fix kasan reported skb use-after-free.

Fixes d7d2d89d4b0af ("r8169: Add software counter for multicast packages")

---

Applies to davem's net as of c5a37883f42be712a989e54d5d6c0159b0e56599 ("Merge branch 'akpm' (patches from Andrew)")

4.2 needs it as well.

 drivers/net/ethernet/realtek/r8169.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/realtek/r8169.c +3 -3
index b4f2123..79ef799 100644
@@ -7429,15 +7429,15 @@ process_pkt:
 
 			rtl8169_rx_vlan_tag(desc, skb);
 
+			if (skb->pkt_type == PACKET_MULTICAST)
+				dev->stats.multicast++;
+
 			napi_gro_receive(&tp->napi, skb);
 
 			u64_stats_update_begin(&tp->rx_stats.syncp);
 			tp->rx_stats.packets++;
 			tp->rx_stats.bytes += pkt_size;
 			u64_stats_update_end(&tp->rx_stats.syncp);
-
-			if (skb->pkt_type == PACKET_MULTICAST)
-				dev->stats.multicast++;
 		}
 release_descriptor:
 		desc->opts2 = 0;
Signature · 1 line
2.5.0
#1 lore raw

From: Francois Romieu <[email protected]>
Date: Wed, 11 Nov 2015 23:35:18 +0100

Quoted 11 lines
Fixes d7d2d89d4b0af ("r8169: Add software counter for multicast packages")

---

Applies to davem's net as of c5a37883f42be712a989e54d5d6c0159b0e56599 ("Merge branch 'akpm' (patches from Andrew)")

4.2 needs it as well.

Applied and queued up for -stable, thanks!