CVE-2026-74666: packet: synchronize pressure clearing with ring reconfiguration

Greg Kroah-Hartman <[email protected]>
Newsgroups org.kernel.vger.linux-cve-announce
Message-ID <2026082228-CVE-2026-74666-f951@gregkh>
From: Greg Kroah-Hartman <[email protected]>

Description
===========

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.

The Linux kernel CVE team has assigned CVE-2026-74666 to this issue.


Affected and fixed versions
===========================

	Issue introduced in 4.2 with commit 2ccdbaa6d55b0656244ba57c4b56765a0af76c0a and fixed in 6.6.152 with commit cf8189b82bb93f219ab740e0346c919ad65ada62
	Issue introduced in 4.2 with commit 2ccdbaa6d55b0656244ba57c4b56765a0af76c0a and fixed in 6.12.104 with commit ad740b4990347521f0db260d381f9f74e7b340ba
	Issue introduced in 4.2 with commit 2ccdbaa6d55b0656244ba57c4b56765a0af76c0a and fixed in 6.18.45 with commit 2c7b5eb87b2b288cdbde825f21d2b83b2f5da747
	Issue introduced in 4.2 with commit 2ccdbaa6d55b0656244ba57c4b56765a0af76c0a and fixed in 7.1.9 with commit a08196c3cc105947746ec21309edfbb60275fcdb
	Issue introduced in 4.2 with commit 2ccdbaa6d55b0656244ba57c4b56765a0af76c0a and fixed in 7.2 with commit 1a35da325cac4d5bcad76a2aa943408a6f1d9000

Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to
older supported kernel versions.  The official CVE entry at
	https://cve.org/CVERecord/?id=CVE-2026-74666
will be updated if fixes are backported, please check that for the most
up to date information about this issue.


Affected files
==============

The file(s) affected by this issue are:
	net/packet/af_packet.c


Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes.  Individual
changes are never tested alone, but rather are part of a larger kernel
release.  Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all.  If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
	https://git.kernel.org/stable/c/cf8189b82bb93f219ab740e0346c919ad65ada62
	https://git.kernel.org/stable/c/ad740b4990347521f0db260d381f9f74e7b340ba
	https://git.kernel.org/stable/c/2c7b5eb87b2b288cdbde825f21d2b83b2f5da747
	https://git.kernel.org/stable/c/a08196c3cc105947746ec21309edfbb60275fcdb
	https://git.kernel.org/stable/c/1a35da325cac4d5bcad76a2aa943408a6f1d9000
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.