All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Eric Dumazet <edumazet@google.com>
Cc: "David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Florian Westphal <fw@strlen.de>,
	netdev@vger.kernel.org, netfilter-devel@vger.kernel.org,
	coreteam@netfilter.org, eric.dumazet@gmail.com,
	syzbot+76d4e3a055aec3b007ec@syzkaller.appspotmail.com
Subject: Re: [PATCH net] netfilter: nf_flow_table: drop existing skb dst before skb_dst_set_noref()
Date: Tue, 4 Aug 2026 12:20:21 +0200	[thread overview]
Message-ID: <anG85QHJ8bjqmuXg@chamomile> (raw)
In-Reply-To: <20260804093328.1831847-1-edumazet@google.com>

On Tue, Aug 04, 2026 at 09:33:28AM +0000, Eric Dumazet wrote:
> Incoming skbs passing through netfilter flowtable offload hooks (or XFRM
> offload path) might already carry a ref-counted dst_entry assigned during
> earlier RX or routing steps.
> 
> Calling skb_dst_set_noref() when skb already holds a ref-counted dst
> overwrites skb->_skb_refdst, leaking the previous dst_entry reference
> count and triggering a DEBUG_NET_WARN_ON_ONCE assertion in
> skb_dst_check_unset():
> 
>   WARNING: at skb_dst_check_unset include/linux/skbuff.h:1170
>   WARNING: at skb_dst_set_noref include/linux/skbuff.h:1234
>   WARNING: at nf_flow_offload_ip_hook+0xf6c/0x2b60 net/netfilter/nf_flow_table_ip.c:864
> 
> Drop any existing dst_entry reference with skb_dst_drop(skb) before
> setting the non-referenced flowtable destination.
> 
> Fixes: 2a79fd3908ac ("netfilter: nf_flow_table: attach dst to skbs")
> Reported-by: syzbot+76d4e3a055aec3b007ec@syzkaller.appspotmail.com
> Closes: https://lore.kernel.org/netdev/6a71b141.9511d2ce.1fc5b9.033b.GAE@google.com/T/#u
> Signed-off-by: Eric Dumazet <edumazet@google.com>

Reviewed-by: Pablo Neira Ayuso <pablo@netfilter.org>

  reply	other threads:[~2026-08-04 10:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-04  9:33 [PATCH net] netfilter: nf_flow_table: drop existing skb dst before skb_dst_set_noref() Eric Dumazet
2026-08-04 10:20 ` Pablo Neira Ayuso [this message]
2026-08-06  0:20 ` patchwork-bot+netdevbpf

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=anG85QHJ8bjqmuXg@chamomile \
    --to=pablo@netfilter.org \
    --cc=coreteam@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=fw@strlen.de \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=syzbot+76d4e3a055aec3b007ec@syzkaller.appspotmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.