From: syzbot <syzbot+bb9127e278fa198e110c@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Forwarded: Don't allow device double-register
Date: Wed, 04 Mar 2026 05:38:25 -0800 [thread overview]
Message-ID: <69a835d1.a70a0220.b118c.001a.GAE@google.com> (raw)
In-Reply-To: <6996dff5.a70a0220.2c38d7.0123.GAE@google.com>
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.
***
Subject: Don't allow device double-register
Author: fw@strlen.de
#syz test: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git main
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index fd7f7e4e2a43..b0fd94427a5a 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -9677,8 +9677,11 @@ static int nft_flowtable_event(unsigned long event, struct net_device *dev,
kfree_rcu(ops, rcu);
break;
case NETDEV_REGISTER:
+ if (ops)
+ pr_warn("reg %px for %s, again, hook ifname %s (%d) cn %d\n", ops, dev->name, hook->ifname, hook->ifnamelen, changename);
+
/* NOP if not matching or already registered */
- if (!match || (changename && ops))
+ if (!match || ops)
continue;
ops = kzalloc_obj(struct nf_hook_ops,
@@ -9701,7 +9704,6 @@ static int nft_flowtable_event(unsigned long event, struct net_device *dev,
list_add_tail_rcu(&ops->list, &hook->ops_list);
break;
}
- break;
}
return 0;
}
next prev parent reply other threads:[~2026-03-04 13:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-19 10:03 [syzbot] [netfilter?] KASAN: use-after-free Read in nf_hook_entry_head syzbot
2026-03-02 14:58 ` Forwarded: " syzbot
2026-03-04 13:38 ` syzbot [this message]
2026-03-04 15:03 ` syzbot
2026-03-04 15:10 ` syzbot
2026-03-04 17:31 ` syzbot
2026-03-05 10:39 ` syzbot
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=69a835d1.a70a0220.b118c.001a.GAE@google.com \
--to=syzbot+bb9127e278fa198e110c@syzkaller.appspotmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzkaller-bugs@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