Re: [PATCH] xfrm: fix missing headroom check in xfrm_dev_direct_output
From: Steffen Klassert
Date: Mon May 18 2026 - 02:34:00 EST
On Sun, May 17, 2026 at 01:19:40PM +0200, Günther Muller wrote:
> Ensure the skb has enough headroom for the hardware offload device's
> hard_header_len. If the headroom is insufficient (e.g., when routing
> through certain virtual or tunnel devices), __skb_push() underflows
> skb->data below skb->head, causing silent memory corruption.
>
> Fix this by using skb_cow_head() to dynamically expand headroom if
> needed, and switch to the checked skb_push() variant.
>
> Signed-off-by: Günther Muller <gunther.muller2008@xxxxxxxxx>
As this is a fix, please add a 'Fixes:' tag to the commit message.
Thanks!