Re: [PATCH nf] netfilter: nfnetlink_log: wait for rcu grace period before freeing pernet state
Florian Westphal <[email protected]> Mon, 3 Aug 2026 20:32:22 +0200
| Newsgroups | gmane.comp.security.firewalls.netfilter.devel |
|---|---|
| Message-ID | <[email protected]> |
Florian Westphal <[email protected]> wrote: > sashiko reports: "nfnl_log_net_exit() calls nf_log_unset(), which > clears the logger pointer without an RCU grace period. Immediately after, > ops_free_list() frees the per-net state while concurrent packets might > still be executing nf_log_packet() under rcu_read_lock()." > > Clear the pointer via .pre_exit to make sure rcu readers have completed > before pernet storage is free'd. The change in nf_log_syslog.c is only > done for consistency: it doesn't use pernet data. Forgot to add: Fixes: 9368a53c471b ("netfilter: nfnetlink_log: add net namespace support for nfnetlink_log") The sashiko review can be ignored, its correct but there is a pending ebt_nflog patch that resolves the issue.