netfilter: ipset: fix performance regression in swap operation
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 28628fa952fefc7f2072ce6e8016968cc452b1ba · < 970709a67696b100a57b33af1a3d75fc34b747eb| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
netfilter: ipset: fix performance regression in swap operation
The patch "netfilter: ipset: fix race condition between swap/destroy and kernel side add/del/test", commit 28628fa9 fixes a race condition. But the synchronize_rcu() added to the swap function unnecessarily slows it down: it can safely be moved to destroy and use call_rcu() instead.
Eric Dumazet pointed out that simply calling the destroy functions as rcu callback does not work: sets with timeout use garbage collectors which need cancelling at destroy which can wait. Therefore the destroy functions are split into two: cancelling garbage collectors safely at executing the command received by netlink and moving the remaining part only into the rcu callback.
From the CVE record · Linux
The Linux kernel's netfilter ipset swap operation has a performance regression caused by an unnecessary synchronize_rcu() call. Swap operations can be slowed; the input does not describe an attacker, access requirements, or user interaction.
Engineers running the Linux kernel with netfilter ipset should check their versions; affected versions are not specified.