xfrm: free the whole skb list on the packet offload drop
Subsystems (3)
PATCH 1/1 xfrm: free the whole skb list on the packet offload drop
validate_xmit_skb() hands the segmentation result of one GSO packet down to validate_xmit_xfrm() as a list. The drop for a packet whose packet offload state no longer matches the device frees the first skb only, so the rest of the list and its payload are leaked.
Fixes f8a70afafc175 ("xfrm: add TX datapath support for IPsec packet offload mode")
Reported-by Sashiko <[email protected]>
Assisted-by LLM
Signed-off-by Wang Zhan <[email protected]>
--- net/xfrm/xfrm_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/xfrm/xfrm_device.c +1 -1
@@ -140,7 +140,7 @@ struct sk_buff *validate_xmit_xfrm(struct sk_buff *skb, netdev_features_t featur* XFRM stack. */ if (x->xso.type ==XFRM_DEV_OFFLOAD_PACKET && x->xso.dev != dev) { -kfree_skb (skb); +kfree_skb_list (skb);dev_core_stats_tx_dropped_inc (dev);return NULL ; }
Signature · 1 line
2.47.3
Please ignore this patch. Re-reading the packet offload output path, I cannot construct a case where that drop sees a segmented list, so it is not fixing a reachable leak.
pw-bot: rejected