packet: synchronize pressure clearing with ring reconfiguration
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 5.10.267, 5.15.218, 6.1.185, 6.6.152, 6.12.104, and 2 more
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: none
- Automatable: no
- Technical impact: total
Summary
In the Linux kernel, the following vulnerability has been resolved: packet: synchronize pressure clearing with ring reconfiguration packet_set_ring() updates the RX ring state under sk_receive_queue.lock, but used to publish the tpacket receive mode through po->prot_hook.func after releasing that lock. packet_poll() and packet_recvmsg() can then run the pressure clearing path after the ring has been cleared while still seeing tpacket_rcv, causing __packet_rcv_has_room() to dereference stale or NULL ring storage. Move the existing receive hook assignment into the same sk_receive_queue.lock section as the ring state update. Keep the assignment otherwise unchanged, including on TX ring reconfiguration, to avoid adding behavior changes that are not required for the fix. Serialize packet_recvmsg() pressure clearing with the same queue lock only after PACKET_SOCK_PRESSURE has been observed. If the flag is clear and the socket has moved away from tpacket_rcv, packet_set_ring() has already detached the socket and waited for synchronize_net(), so no new packet input can set the flag again. packet_poll() already holds sk_receive_queue.lock, so it uses the new unlocked helper directly.
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: none · Automatable: no · Technical impact: total
- Record last updated
Affected versions
- Linux Linux
From 2ccdbaa6d55b0656244ba57c4b56765a0af76c0a · fixed in bf3c8e86bc8ad111be3f3136125e255344bcb3da; From 2ccdbaa6d55b0656244ba57c4b56765a0af76c0a · fixed in 8cfb2e71926a682f36c4240067d424074dd8f70f; From 2ccdbaa6d55b0656244ba57c4b56765a0af76c0a · fixed in f015c9de92b731814059a343b765c60c0196225c; From 2ccdbaa6d55b0656244ba57c4b56765a0af76c0a · fixed in cf8189b82bb93f219ab740e0346c919ad65ada62; From 2ccdbaa6d55b0656244ba57c4b56765a0af76c0a · fixed in ad740b4990347521f0db260d381f9f74e7b340ba; From 2ccdbaa6d55b0656244ba57c4b56765a0af76c0a · fixed in 2c7b5eb87b2b288cdbde825f21d2b83b2f5da747; From 2ccdbaa6d55b0656244ba57c4b56765a0af76c0a · fixed in a08196c3cc105947746ec21309edfbb60275fcdb; From 2ccdbaa6d55b0656244ba57c4b56765a0af76c0a · fixed in 1a35da325cac4d5bcad76a2aa943408a6f1d9000
- Linux Linux
4.2
- KernelLinux
From 4.2.0 · fixed in 5.10.267; From 5.11.0 · fixed in 5.15.218; From 5.16.0 · fixed in 6.1.185; From 6.2.0 · fixed in 6.6.152; From 6.7.0 · fixed in 6.12.104; From 6.13.0 · fixed in 6.18.45; From 6.19.0 · fixed in 7.1.9
References 8
git.kernel.org
- stable/c/bf3c8e86bc8ad111be3f3136125e255344bcb3da
- stable/c/8cfb2e71926a682f36c4240067d424074dd8f70f
- stable/c/f015c9de92b731814059a343b765c60c0196225c
- stable/c/cf8189b82bb93f219ab740e0346c919ad65ada62
- stable/c/ad740b4990347521f0db260d381f9f74e7b340ba
- stable/c/2c7b5eb87b2b288cdbde825f21d2b83b2f5da747
- stable/c/a08196c3cc105947746ec21309edfbb60275fcdb
- stable/c/1a35da325cac4d5bcad76a2aa943408a6f1d9000