Linux
net/tcp-ao: fix use-after-free of key in del_async path
In the Linux kernel, the following vulnerability has been resolved: net/tcp-ao: fix use-after-free of key in del_async path In tcp_ao_delete_key(), the del_async path skips the current_key and rnext_key validity checks present in the synchronous path, assuming these pointers are always NULL on LISTEN sockets. However, if a key was added with set_current=1/set_rnext=1 while the socket was in CLOSE state, current_key and rnext_key will be non-NULL after listen() transitions the socket to LISTEN. When such a key is deleted with del_async=1, hlist_del_rcu() and call_rcu() free the key without clearing the dangling pointers. After the RCU grace period, getsockopt(TCP_AO_INFO) dereferences current_key->sndid and rnext_key->rcvid from freed slab memory. Clear current_key and rnext_key in the del_async path when they reference the key being deleted.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= d6732b95b6fbbc6d5bb9d2f809e275763640c4a2, < 6ce7ef41743740ce15c2061561b784148b565b3f
- >= d6732b95b6fbbc6d5bb9d2f809e275763640c4a2, < e77fbefd1269b5c123e7c651a1ebdce1b87d19a0
- >= d6732b95b6fbbc6d5bb9d2f809e275763640c4a2, < 7ddc29a094d96e9b3aa280433c6dc443df9eabf2
- >= d6732b95b6fbbc6d5bb9d2f809e275763640c4a2, < 5ba9950bc9078e19b69cca1e56d1553b125c6857
Fixed in 6ce7ef41743740ce15c2061561b784148b565b3f, e77fbefd1269b5c123e7c651a1ebdce1b87d19a0, 7ddc29a094d96e9b3aa280433c6dc443df9eabf2, 5ba9950bc9078e19b69cca1e56d1553b125c6857
- 6.7
Fixed in 0, 6.12.95, 6.18.38, 7.1.3, 7.2
Mitigation
Upgrade Linux to 6ce7ef41743740ce15c2061561b784148b565b3f or e77fbefd1269b5c123e7c651a1ebdce1b87d19a0 or 7ddc29a094d96e9b3aa280433c6dc443df9eabf2 or 5ba9950bc9078e19b69cca1e56d1553b125c6857 or later.
Upgrade Linux to 0 or 6.12.95 or 6.18.38 or 7.1.3 or 7.2 or later.
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.