From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>,
Florian Westphal <fw@strlen.de>,
netfilter-devel@vger.kernel.org, netdev <netdev@vger.kernel.org>,
Eric Dumazet <edumazet@google.com>,
syzbot <syzkaller@googlegroups.com>
Subject: Re: [PATCH net] netfilter: nftables: fix use-after-free in nft_set_catchall_destroy()
Date: Wed, 15 Dec 2021 23:44:07 +0100 [thread overview]
Message-ID: <Ybpvt4NgxoSlfbAQ@salvia> (raw)
In-Reply-To: <20211213134544.2823107-1-eric.dumazet@gmail.com>
On Mon, Dec 13, 2021 at 05:45:44AM -0800, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@google.com>
>
> We need to use list_for_each_entry_safe() iterator
> because we can not access @catchall after kfree_rcu() call.
>
> syzbot reported:
>
> BUG: KASAN: use-after-free in nft_set_catchall_destroy net/netfilter/nf_tables_api.c:4486 [inline]
> BUG: KASAN: use-after-free in nft_set_destroy net/netfilter/nf_tables_api.c:4504 [inline]
> BUG: KASAN: use-after-free in nft_set_destroy+0x3fd/0x4f0 net/netfilter/nf_tables_api.c:4493
> Read of size 8 at addr ffff8880716e5b80 by task syz-executor.3/8871
Applied to nf, thanks
prev parent reply other threads:[~2021-12-15 22:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-13 13:45 [PATCH net] netfilter: nftables: fix use-after-free in nft_set_catchall_destroy() Eric Dumazet
2021-12-15 22:44 ` Pablo Neira Ayuso [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=Ybpvt4NgxoSlfbAQ@salvia \
--to=pablo@netfilter.org \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=fw@strlen.de \
--cc=kadlec@blackhole.kfki.hu \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=syzkaller@googlegroups.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).