net: restore refcount ordering for lockless socket access
NIST has received this entry but not started reviewing it.
In the Linux kernel, the following vulnerability has been resolved: net: restore refcount ordering for lockless socket access Before commit fb041bb7c0a9 ("locking/refcount: Consolidate implementations of refcount_t"), default builds implemented refcount_inc_not_zero() using atomic_add_unless(), which provided full memory ordering on success. The commit removed that ordering on weakly ordered architectures, allowing accesses after a successful reference acquisition to be reordered before it. Use refcount_inc_not_zero_acquire() in the IPv4 and IPv6 established lookups and in inet_twsk_purge(), where the socket is validated again after taking a reference. bpf_sk_assign() can receive a socket pointer obtained through BTF without a reference. Use acquire ordering when it takes its own reference for a refcounted socket. Use refcount_set_release() when setting refcounts in the SYN cookie, TCP Fast Open, request migration, and TIME_WAIT paths. Keep the existing TIME_WAIT smp_wmb(), which separately orders the refcount store before ehash publication.
New to this? Read how to keep your software updated.
The products and versions NIST lists as vulnerable, 2 products in all. If what you run is not listed it is probably not affected, but ask your provider if you are unsure.
| Product | Type | Vulnerable versions | Fixed in |
|---|---|---|---|
| Linux Linux | Software | from fb041bb7c0a918b95c6889fc965cdc4a75b4c0ca, before 6f4fc93f76cd8ebd3c89a064573715503048d1ad; from fb041bb7c0a918b95c6889fc965cdc4a75b4c0ca, before ddd14d0b5b5e650077779d9a158cb7a80ee8297b; from fb041bb7c0a918b95c6889fc965cdc4a75b4c0ca, before 52f5a5ab318f5b120eb686069fbd0108016c02b2; from fb041bb7c0a918b95c6889fc965cdc4a75b4c0ca, before 5b5d8f351dd96f56a58bb516a80e2d4d742fe4e2; d0d583484d2ed9f5903edbbfa7e2a68f78b950b0; from 5.4.208, before 5.5 | 6f4fc93f76cd8ebd3c89a064573715503048d1ad; ddd14d0b5b5e650077779d9a158cb7a80ee8297b; 52f5a5ab318f5b120eb686069fbd0108016c02b2; 5b5d8f351dd96f56a58bb516a80e2d4d742fe4e2 |
| Linux Linux | Software | 5.5 | not recorded |
The 9.8 severity score (critical) from the company that reported it, broken into what it means in practice. Red means it makes the flaw easier or worse.
| How it is reached | Network | Can be attacked from anywhere on the internet, with no need to be near the target. |
| How hard it is | Low | Easy to carry out. No special conditions have to line up. |
| Login needed | None | The attacker does not need an account or password. |
| Someone has to act | None | Nobody has to click or open anything. It can happen on its own. |
| Reaches beyond the program | Unchanged | The damage stays inside the vulnerable program. |
| Data exposed | High | Total loss of confidentiality: the attacker can read all the data the program can reach. |
| Data changed | High | The attacker can change or delete anything the program can reach. |
| Service disrupted | High | The attacker can take the service down completely. |
| Ease of attack | 3.9 | A score for how easy it is to use the flaw. Higher is easier. |
| Damage | 5.9 | A score for how bad the harm is if it works. Higher is worse. |
NIST lists 4 sources for this flaw, none tagged as a vendor patch.