Netdev List
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Ren Wei <weir@nebusec.ai>,
	netdev@vger.kernel.org, andrea.mayer@uniroma2.it
Cc: davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
	horms@kernel.org, contact@proelbtn.com, pablo@netfilter.org,
	vega@nebusec.ai, sashiko-bot@kernel.org, petalzu987@gmail.com,
	liuhangbin@kylinos.cn
Subject: Re: [PATCH net v3 1/1] seg6: validate state in netfilter continuations
Date: Tue, 27 Oct 2026 11:52:17 +0100	[thread overview]
Message-ID: <02c9ba7e-469a-4a2a-9bed-9a1d9a8be352@redhat.com> (raw)
In-Reply-To: <6edcb09db8ec3dda9e26ab5c5be45769907011d5.1792660496.git.petalzu987@gmail.com>

On 10/24/26 09:23, Ren Wei wrote:
> From: Zixuan Chai <petalzu987@gmail.com>
> 
> Netfilter hooks can replace or drop skb_dst() before an SRv6 continuation
> resumes. The continuation callbacks then assume that the current dst still
> contains the expected lwtstate, which can lead to invalid state access.
> 
> Validate the current dst and lwtstate in each NF_HOOK() okfn wrapper.
> Drop the skb when the state is missing or has the wrong type. Keep the
> direct core calls unchanged when nf_hooks_lwtunnel is off.
> 
> Fixes: 7a3f5b0de364 ("netfilter: add netfilter hooks to SRv6 data plane")
> Cc: stable@vger.kernel.org
> Reported-by: Vega <vega@nebusec.ai>
> Reported-by: Sashiko <sashiko-bot@kernel.org>
> Closes: https://sashiko.dev/#/patchset/20260720204430.1886091-1-xmei5@asu.edu
> Assisted-by: LLM
Minor nir: the above tag should not be added anymore.

> @@ -624,10 +648,10 @@ static int seg6_input_nf(struct sk_buff *skb)
>   	switch (skb->protocol) {
>   	case htons(ETH_P_IP):
>   		return NF_HOOK(NFPROTO_IPV4, NF_INET_POST_ROUTING, net, NULL,
> -			       skb, NULL, dev, seg6_input_core);
> +				       skb, NULL, dev, seg6_input_core_nf);
>   	case htons(ETH_P_IPV6):
>   		return NF_HOOK(NFPROTO_IPV6, NF_INET_POST_ROUTING, net, NULL,
> -			       skb, NULL, dev, seg6_input_core);
> +				       skb, NULL, dev, seg6_input_core_nf);

Please do not include unneeded whitespaces-only changes. There is a similar
chunk below.

Other than that the patch LGTM, but when resubmitting please do not include
the unneeded cover letter.

Thanks,

Paolo


  reply	other threads:[~2026-10-27 10:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-24  7:23 [PATCH net v3 0/1] seg6: validate state in netfilter continuations Ren Wei
2026-10-24  7:23 ` [PATCH net v3 1/1] " Ren Wei
2026-10-27 10:52   ` Paolo Abeni [this message]
2026-10-28  2:26   ` Andrea Mayer

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=02c9ba7e-469a-4a2a-9bed-9a1d9a8be352@redhat.com \
    --to=pabeni@redhat.com \
    --cc=andrea.mayer@uniroma2.it \
    --cc=contact@proelbtn.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=liuhangbin@kylinos.cn \
    --cc=netdev@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=petalzu987@gmail.com \
    --cc=sashiko-bot@kernel.org \
    --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