netfilter: nft_counter: serialize reset with spinlock
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 3cb03edb4de33fd04c4ea55f47397b96a8657c53 · < 779c60a5190c42689534172f4b49e927c9959e4e| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nft_counter: serialize reset with spinlock
Add a global static spinlock to serialize counter fetch+reset operations, preventing concurrent dump-and-reset from underrunning values.
The lock is taken before fetching the total so that two parallel resets cannot both read the same counter values and then both subtract them.
A global lock is used for simplicity since resets are infrequent. If this becomes a bottleneck, it can be replaced with a per-net lock later.
From the CVE record · Linux
The Linux kernel's netfilter nft_counter can underflow counter values when concurrent dump-and-reset operations both read and subtract the same values. The input does not specify who can trigger these operations, whether authentication is needed, or whether user interaction is required.
Teams running the Linux kernel should check their systems; affected versions are not specified.