Netdev List
 help / color / mirror / Atom feed
* [PATCH nf v2 0/2] ipvs: fix OOB write when NATing ICMPv6 errors quoting non-first fragments
@ 2026-11-17 13:40 Axel Mierczuk
  2026-11-17 13:40 ` [PATCH nf v2 1/2] ipvs: avoid out-of-bounds write in ip_vs_nat_icmp_v6 Axel Mierczuk
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Axel Mierczuk @ 2026-11-17 13:40 UTC (permalink / raw)
  To: ja, horms, pablo
  Cc: fw, phil, dsahern, kuba, edumazet, pabeni, davem, netfilter-devel,
	lvs-devel, coreteam, netdev, w, Axel Mierczuk

This series fixes a 16-byte OOB write past the verified skb area,
reachable through ICMPv6 errors that quote non-first fragments.
Following Julian's suggestion, it preserves ESP ICMPv6 handling.

Patch 1 includes the embedded IP header in ciph.len at both ICMPv6
call sites when parsing stops at a non-first fragment. It stands on
its own for stable.

Patch 2 makes ipv6_find_hdr() set *offset to the fragment payload
for non-first fragments when target < 0, rejecting a truncated
Fragment header, so every successful return updates *offset. It
drops the workaround from patch 1, which becomes dead code.

Changes since v1:
- Patch 1: rewrote the comment and commit message. Nothing blocks an
  embedded ESP fragment on ciph.len; it continues because of
  pp->dont_defrag and its lookup reads only the addresses. Name the
  skb_ensure_writable() callers, handle_response_icmp() and
  ip_vs_icmp_xmit_v6(), that size the writable area from ciph.len.
  Code unchanged.
- Patch 2: return -EBADMSG when the Fragment header is truncated, so
  *offset never exceeds skb->len (Sashiko, Julian). Add Fixes tag
  (Julian). Drop the ciph.len workaround from patch 1 now that every
  successful return writes *offset (Sashiko). Describe the
  handle_response() effect, the nf_tables trace output change and the
  SYNPROXY callers in the commit message.

v1: https://lore.kernel.org/netfilter-devel/20260925141155.17603-1-axel.mierczuk@1password.com/

Axel Mierczuk (2):
  ipvs: avoid out-of-bounds write in ip_vs_nat_icmp_v6
  ipv6: update *offset for non-first fragments in ipv6_find_hdr()

 net/ipv6/exthdrs_core.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)


base-commit: 734bef548a96e8774d6eef5dfa2026c6edc4e80b
-- 
2.50.1 (Apple Git-155)


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

end of thread, other threads:[~2026-11-17 13:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-17 13:40 [PATCH nf v2 0/2] ipvs: fix OOB write when NATing ICMPv6 errors quoting non-first fragments Axel Mierczuk
2026-11-17 13:40 ` [PATCH nf v2 1/2] ipvs: avoid out-of-bounds write in ip_vs_nat_icmp_v6 Axel Mierczuk
2026-11-17 13:40 ` [PATCH nf v2 2/2] ipv6: update *offset for non-first fragments in ipv6_find_hdr() Axel Mierczuk
2026-11-17 13:43 ` [PATCH nf v2 0/2] ipvs: fix OOB write when NATing ICMPv6 errors quoting non-first fragments netdev-bot+sinfo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox