netfilter: nat: use kfree_rcu to release ops
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ e2cf17d3774c323ef6dab6e9f7c0cfc5e742afd9 · < 6eda0d771f94267f73f57c94630aa47e90957915| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nat: use kfree_rcu to release ops
Florian Westphal says:
"Historically this is not an issue, even for normal base hooks: the data path doesn't use the original nf_hook_ops that are used to register the callbacks.
However, in v5.14 I added the ability to dump the active netfilter hooks from userspace.
This code will peek back into the nf_hook_ops that are available at the tail of the pointer-array blob used by the datapath.
The nat hooks are special, because they are called indirectly from the central nat dispatcher hook. They are currently invisible to the nfnl hook dump subsystem though.
But once that changes the nat ops structures have to be deferred too."
From the CVE record · Linux
The Linux kernel's netfilter NAT code can release hook operation structures before hook-dump readers are finished with them. The issue also affects partial hook registration on an error path. The input does not specify attacker access requirements or user interaction.
Engineers running Linux kernels with netfilter NAT should check their versions; affected versions are not specified in the input.