From: Florian Westphal <fw@strlen.de>
To: Ren Wei <weir@nebusec.ai>
Cc: netfilter-devel@vger.kernel.org, pablo@netfilter.org,
phil@nwl.cc, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
kaber@trash.net, vega@nebusec.ai, petalzu987@gmail.com
Subject: Re: [PATCH nf 0/1] netfilter: nf_ip6_checksum: validate checksum offset
Date: Fri, 18 Sep 2026 12:38:28 +0200 [thread overview]
Message-ID: <aq0UpHHbvxjR2jLb@strlen.de> (raw)
In-Reply-To: <cover.1789660425.git.petalzu987@gmail.com>
Ren Wei <weir@nebusec.ai> wrote:
> From: Zixuan Chai <petalzu987@gmail.com>
>
> Hi Linux kernel maintainers,
>
> We found and validated an issue in net/netfilter/utils.c. The bug can be
> reached by a non-root user when unprivileged user namespaces are enabled,
> using user and network namespaces. We tested the fix in QEMU, and it does
> not affect valid checksum handling or other tested functionality.
>
> We will provide detailed information about the bug in this email,
> along with a PoC to trigger it.
patch is fine, but could you make another patch that either fixes
ipv6_find_hdr() or ip6_packet_match() / nft_set_pktinfo_ipv6() as well?
If I read this right then ipv6_find_hdr() returns nexthdr 'TCP',
but its clear packet is malformed and that header isn't there.
Assuming nexthdr would not pass ipv6_ext_hdr() / nexthdr == NONE
test. then this would hit:
hp = skb_header_pointer(skb, start, sizeof(_hdr), &_hdr);
if (!hp)
return -EBADMSG;
(as start is past skb->len).
... so I think ipv6_find_hdr() should also validate offset
is not past skb->len before telling the caller that 'nexthdr'
is at offset <bignum>.
Or do you see a case where this would break anything?
Thanks!
next prev parent reply other threads:[~2026-09-18 10:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-18 9:26 [PATCH nf 0/1] netfilter: nf_ip6_checksum: validate checksum offset Ren Wei
2026-09-18 9:26 ` [PATCH nf 1/1] " Ren Wei
2026-09-18 10:38 ` Florian Westphal [this message]
2026-09-18 11:33 ` [PATCH nf 0/1] " Pablo Neira Ayuso
2026-09-18 14:15 ` Florian Westphal
2026-09-19 14:35 ` Zixuan Chai
2026-10-08 16:01 ` Zixuan Chai
2026-10-08 17:24 ` Florian Westphal
2026-10-08 23:29 ` Pablo Neira Ayuso
2026-10-09 0:05 ` Florian Westphal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aq0UpHHbvxjR2jLb@strlen.de \
--to=fw@strlen.de \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kaber@trash.net \
--cc=kuba@kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.org \
--cc=petalzu987@gmail.com \
--cc=phil@nwl.cc \
--cc=vega@nebusec.ai \
--cc=weir@nebusec.ai \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox