Message ID | 20240528225519.1155786-2-pablo@netfilter.org (mailing list archive) |
---|---|
State | Accepted |
Commit | dc21c6cc3d6986d938efbf95de62473982c98dec |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net,1/6] netfilter: nfnetlink_queue: acquire rcu_read_lock() in instance_destroy_rcu() | expand |
Hello: This series was applied to netdev/net.git (main) by Pablo Neira Ayuso <pablo@netfilter.org>: On Wed, 29 May 2024 00:55:14 +0200 you wrote: > From: Eric Dumazet <edumazet@google.com> > > syzbot reported that nf_reinject() could be called without rcu_read_lock() : > > WARNING: suspicious RCU usage > 6.9.0-rc7-syzkaller-02060-g5c1672705a1a #0 Not tainted > > [...] Here is the summary with links: - [net,1/6] netfilter: nfnetlink_queue: acquire rcu_read_lock() in instance_destroy_rcu() https://git.kernel.org/netdev/net/c/dc21c6cc3d69 - [net,2/6] netfilter: ipset: Add list flush to cancel_gc https://git.kernel.org/netdev/net/c/c1193d9bbbd3 - [net,3/6] netfilter: nft_payload: restore vlan q-in-q match support https://git.kernel.org/netdev/net/c/aff5c01fa128 - [net,4/6] netfilter: nft_payload: skbuff vlan metadata mangle support https://git.kernel.org/netdev/net/c/33c563ebf8d3 - [net,5/6] netfilter: tproxy: bail out if IP has been disabled on the device https://git.kernel.org/netdev/net/c/21a673bddc8f - [net,6/6] netfilter: nft_fib: allow from forward/input without iif selector https://git.kernel.org/netdev/net/c/e8ded22ef0f4 You are awesome, thank you!
diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c index 00f4bd21c59b..f1c31757e496 100644 --- a/net/netfilter/nfnetlink_queue.c +++ b/net/netfilter/nfnetlink_queue.c @@ -169,7 +169,9 @@ instance_destroy_rcu(struct rcu_head *head) struct nfqnl_instance *inst = container_of(head, struct nfqnl_instance, rcu); + rcu_read_lock(); nfqnl_flush(inst, NULL, 0); + rcu_read_unlock(); kfree(inst); module_put(THIS_MODULE); }