Linux Netfilter development
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: 岩橋涼介 <ryosuke@ikotaslabs.com>
Cc: pablo@netfilter.org, fw@strlen.de, security@kernel.org,
	phil@nwl.cc, netfilter-devel@vger.kernel.org,
	coreteam@netfilter.org
Subject: Re: [PATCH nf] netfilter: nf_conntrack_reasm: restore IPv6 nhoff after reassembly
Date: Sun, 1 Nov 2026 09:57:53 +0100	[thread overview]
Message-ID: <2026110155-twisting-autism-009a@gregkh> (raw)
In-Reply-To: <CAN2NGG5Y_A4ZcH3Wh8A8HeF42zOR=HnUpKYH7zxi7DJeqhwwjQ@mail.gmail.com>

On Sat, Oct 31, 2026 at 08:45:52PM -0500, 岩橋涼介 wrote:
> >From 8197824cf0c745a032f6deddfc19fd62302c804e Mon Sep 17 00:00:00 2001
> From: Ryosuke <ryosuke@ikotaslabs.com>
> Date: Sun, 1 Nov 2026 10:43:10 +0900
> Subject: [PATCH nf] netfilter: nf_conntrack_reasm: restore IPv6 nhoff after
>  reassembly

This doesn't all need to be here, please use 'git send-email' or b4 to
send patches.

> 
> nf_ct_frag6_reasm() removes the fragment header and resets the transport
> header, but unlike ip6_frag_reasm() it leaves IP6CB(skb)->nhoff set to
> its pre-reassembly value.
> 
> Subsequent IPv6 local delivery consumes this stale next-header offset
> alongside the updated transport header. As a result, the two cursors
> can point to different protocol boundaries after conntrack
> defragmentation, causing later processing stages to interpret a
> different transport protocol than the one evaluated by conntrack and
> nftables.
> 
> Restore IP6CB(skb)->nhoff from the saved pre-fragment next-header offset
> after reassembly, matching ip6_frag_reasm().
> 
> Fixes: 9fb9cbb1082d ("[NETFILTER]: Add nf_conntrack subsystem.")
> Cc: stable@vger.kernel.org
> Assisted-by: Codex:gpt-5
> Signed-off-by: Ryosuke <ryosuke@ikotaslabs.com>

Real name please.

> ---
>  net/ipv6/netfilter/nf_conntrack_reasm.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c
> b/net/ipv6/netfilter/nf_conntrack_reasm.c
> index 599c49b..ab06b05 100644
> --- a/net/ipv6/netfilter/nf_conntrack_reasm.c
> +++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
> @@ -321,6 +321,7 @@ static int nf_ct_frag6_reasm(struct frag_queue
> *fq, struct sk_buff *skb,

Your patch is line-wrapped and can not be applied :(

thanks,

greg k-h

  reply	other threads:[~2026-11-01  8:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-01  1:45 [PATCH nf] netfilter: nf_conntrack_reasm: restore IPv6 nhoff after reassembly 岩橋涼介
2026-11-01  8:57 ` Greg KH [this message]
2026-11-01 17:06   ` [PATCH v2 " Ryosuke Iwahashi

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=2026110155-twisting-autism-009a@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=coreteam@netfilter.org \
    --cc=fw@strlen.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=phil@nwl.cc \
    --cc=ryosuke@ikotaslabs.com \
    --cc=security@kernel.org \
    /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