All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf 0/2] bpf: fix skb->transport_header after a decap
@ 2026-12-05 12:56 Chris Mason
  2026-12-05 12:57 ` [PATCH bpf 1/2] bpf: Don't use an unset inner transport header Chris Mason
  2026-12-05 12:58 ` [PATCH bpf 2/2] bpf: Keep skb->transport_header for ESP offload Chris Mason
  0 siblings, 2 replies; 5+ messages in thread
From: Chris Mason @ 2026-12-05 12:56 UTC (permalink / raw)
  To: ast, daniel, andrii, bpf, netdev
  Cc: eddyz87, memxor, martin.lau, song, yonghong.song, jolsa, emil,
	ihor.solodrai, john.fastabend, sdf, davem, edumazet, kuba, pabeni,
	willemb, horms, nhudson, linux-kernel, mason

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-12-05 14:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-05 12:56 [PATCH bpf 0/2] bpf: fix skb->transport_header after a decap Chris Mason
2026-12-05 12:57 ` [PATCH bpf 1/2] bpf: Don't use an unset inner transport header Chris Mason
2026-12-05 13:30   ` sashiko-bot
2026-12-05 14:32     ` Chris Mason
2026-12-05 12:58 ` [PATCH bpf 2/2] bpf: Keep skb->transport_header for ESP offload Chris Mason

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.