netfilter: nfnetlink_log: wait for rcu grace period before freeing pernet state
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ c83fa19603bdaeef17b815713dbbe3230c8a34ee · < 33d1469b0124cc0baaea7a2032123b77a81e0940| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nfnetlink_log: wait for rcu grace period before freeing pernet state
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.
From the CVE record · Linux
The Linux kernel's nfnetlink_log can free per-network-namespace state while concurrent packet logging still accesses it. This race can occur during network namespace teardown; the input does not specify attacker access requirements or user interaction.
Engineers running Linux kernels with netfilter nfnetlink_log should check their kernel versions against the vendor advisory; affected versions are not specified.