[PATCH bpf 0/2] bpf: fix skb->transport_header after a decap
From: Chris Mason
Date: Sat Dec 05 2026 - 07:56:42 EST
Hi everyone,
These are AI generated fixes for two bugs in my commit 33be492c2e23 ("bpf: Use
the inner transport header after a decap"). A decap with bpf_skb_adjust_room()
can move skb->transport_header to the wrong place.
- Patch 1: nobody has set the inner transport header, and its offset has
wrapped. The kernel drops valid GSO packets then.
- Patch 2: ESP still has to encrypt the packet. It gets corrupted or dropped,
and a very short one can hit a BUG().
AI generated tests reproduce both bugs on v7.4-rc5, and pass with the patches.
7.3.7 has both bugs too.
This is on top of v7.4-rc5.
Chris Mason (2):
bpf: Don't use an unset inner transport header
bpf: Keep skb->transport_header for ESP offload
net/core/filter.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
base-commit: fe6ff8d5d675c01793b9f051d16055dd4aa75244