Linux Netfilter development
 help / color / mirror / Atom feed
From: Yu Junzhe <junzheyu1@gmail.com>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Sasha Levin <sashal@kernel.org>,
	Pablo Neira Ayuso <pablo@netfilter.org>,
	Florian Westphal <fw@strlen.de>,
	netfilter-devel@vger.kernel.org
Subject: Re: [PATCH request stable 6.12 6.6 6.1] netfilter: nf_tables_netdev_event UAF of binding chain
Date: Fri, 25 Sep 2026 07:51:24 +0000	[thread overview]
Message-ID: <20260925075128.646-1-junzheyu1@gmail.com> (raw)
In-Reply-To: <2026092558-grime-yahoo-6b34@gregkh>

Hello Greg,

The two upstream commits cherry-pick cleanly. They are Phil Sutter's
"Tolerate chains with no remaining hooks" (fc0133428e7a) and "Simplify
chain netdev notifier" (375f222800bc). The second is the follow-up that
makes list_for_each_entry() safe once the notifier no longer deletes the
base chain.

The 6.12 diff does not apply to 6.6 or 6.1: those trees still check
NETDEV_CHANGENAME in nf_tables_netdev_event(). So this is two series,
not one:

  [PATCH 6.12 1/2] and [PATCH 6.12 2/2]
  [PATCH 6.6 6.1 1/2] and [PATCH 6.6 6.1 2/2]

The 6.6 series applies cleanly on linux-6.1.y as well. Neither series
touches the rest of the netdev-hook rework.

Tested on KASAN guests, with the anonymous-jump ruleset from the
original report (base chain committed, then `nft add rule ... 'jump
{ accept; }'`, then `ip link del br0`):

  6.12.111  no slab-use-after-free in nf_tables_netdev_event
  6.6.157   no slab-use-after-free in nf_tables_netdev_event
  6.1.188   no slab-use-after-free in nf_tables_netdev_event

The same ruleset hits that KASAN bug on unpatched 6.6.144.

Thanks,
Yu Junzhe

  reply	other threads:[~2026-09-25  7:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-25  2:00 [PATCH request stable 6.12 6.6 6.1] netfilter: nf_tables_netdev_event UAF of binding chain Yu Junzhe
2026-09-25  5:07 ` Greg Kroah-Hartman
2026-09-25  7:51   ` Yu Junzhe [this message]
2026-09-25  7:51     ` [PATCH 6.12 1/2] netfilter: nf_tables: Tolerate chains with no remaining hooks Yu Junzhe
2026-09-25  7:51     ` [PATCH 6.12 2/2] netfilter: nf_tables: Simplify chain netdev notifier Yu Junzhe
2026-09-25  7:51     ` [PATCH 6.6 6.1 1/2] netfilter: nf_tables: Tolerate chains with no remaining hooks Yu Junzhe
2026-09-25 18:47       ` Sasha Levin
2026-10-01  3:51         ` [PATCH 6.1] netfilter: nf_tables: fix UAF in nf_tables_netdev_event walker Ma Xinmeng
2026-10-01  8:46           ` Pablo Neira Ayuso
2026-10-02  4:25             ` [PATCH 6.1 1/2] netfilter: nf_tables: allow to create netdev chain without device Ma Xinmeng
2026-10-02 21:10               ` Sasha Levin
2026-10-02 21:44                 ` Pablo Neira Ayuso
     [not found]             ` <20261002042509.711-1-1564938642@qq.com>
2026-10-02  4:25               ` [PATCH 6.1 2/2] netfilter: nf_tables: support for adding new devices to an existing netdev chain Ma Xinmeng
2026-09-25  7:51     ` [PATCH 6.6 6.1 2/2] netfilter: nf_tables: Simplify chain netdev notifier Yu Junzhe

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=20260925075128.646-1-junzheyu1@gmail.com \
    --to=junzheyu1@gmail.com \
    --cc=fw@strlen.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=sashal@kernel.org \
    --cc=stable@vger.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