From: Florian Westphal <fw@strlen.de>
To: David Lee <david.lee@trailofbits.com>
Cc: pablo@netfilter.org, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com,
Kyle Zeng <kylebot@openai.com>,
Dominik 'Disconnect3d' Czarnota
<dominik.czarnota@trailofbits.com>,
phil@nwl.cc, horms@kernel.org, netfilter-devel@vger.kernel.org,
coreteam@netfilter.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH nf] netfilter: nf_reject_ipv4: initialize IPCB at inet ingress
Date: Tue, 4 Aug 2026 12:21:03 +0200 [thread overview]
Message-ID: <anG9D4P33SG9uubK@strlen.de> (raw)
In-Reply-To: <20260804095105.715387-1-david.lee@trailofbits.com>
David Lee <david.lee@trailofbits.com> wrote:
> From: Kyle Zeng <kylebot@openai.com>
>
> The inet ingress hook runs before ip_rcv_core(), so IPCB has not been
> initialized when nft_reject_inet passes an IPv4 packet to
> nf_send_unreach(). skb->cb can therefore retain data from an earlier
> protocol layer.
>
> icmp_send() treats IPCB(skb)->opt as parsed IPv4 options. Stale option
> offsets can make __ip_options_echo() copy an attacker-controlled length
> into its 40-byte reply option buffer and overflow the stack.
>
> Clear IPCB for NF_INET_INGRESS and restore its input interface, matching
> the initialization normally performed by ip_rcv_core().
Will you also send a patch for net/ipv6/netfilter/nf_reject_ipv6.c ?
Or: send a v2 that also fixes this up,
Or: send a v2 that mentions why net/ipv6/netfilter/nf_reject_ipv6.c is
fine (I doubt it).
prev parent reply other threads:[~2026-08-04 10:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-04 9:51 [PATCH nf] netfilter: nf_reject_ipv4: initialize IPCB at inet ingress David Lee
2026-08-04 10:21 ` Florian Westphal [this message]
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=anG9D4P33SG9uubK@strlen.de \
--to=fw@strlen.de \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=david.lee@trailofbits.com \
--cc=dominik.czarnota@trailofbits.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kylebot@openai.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.org \
--cc=phil@nwl.cc \
/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