Skip to contentSkip to conversation

wifi: mt76: mt792x: fix UAF in SDIO TX path when out of memory

PATCH Superseded Eason Lai 1 participant 1 message Aug 17

Subsystems (2)

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

Eason Lai

author
#0 lore raw

PATCH 1/1 wifi: mt76: mt792x: fix UAF in SDIO TX path when out of memory

Using __skb_pad() instead of skb_pad() in mt76_skb_adjust_pad() to prevent double-free, as the caller handles cleanup.

Fixes 808f2767d421 ("wifi: mt76: mt792x: Fix memory leak in SDIO TX path")
---
 drivers/net/wireless/mediatek/mt76/tx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/tx.c +1 -1
index 3707ee19e4ae..ec503521ae63 100644
@@ -879,7 +879,7 @@ int mt76_skb_adjust_pad(struct sk_buff *skb, int pad)
 		}
 	}
 
-	if (skb_pad(last, pad))
+	if (__skb_pad(last, pad, false))
 		return -ENOMEM;
 
 	__skb_put(last, pad);
Signature · 1 line
2.45.2