Skip to contentSkip to conversation

CVE-2026-43216: net: Drop the lock in skb_may_tx_timestamp()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message May 6

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

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

In the Linux kernel, the following vulnerability has been resolved:

net: Drop the lock in skb_may_tx_timestamp()

skb_may_tx_timestamp() may acquire sock::sk_callback_lock. The lock must not be taken in IRQ context, only softirq is okay. A few drivers receive the timestamp via a dedicated interrupt and complete the TX timestamp from that handler. This will lead to a deadlock if the lock is already write-locked on the same CPU.

Taking the lock can be avoided. The socket (pointed by the skb) will remain valid until the skb is released. The ->sk_socket and ->file member will be set to NULL once the user closes the socket which may happen before the timestamp arrives.
If we happen to observe the pointer while the socket is closing but before the pointer is set to NULL then we may use it because both pointer (and the file's cred member) are RCU freed.

Drop the lock. Use READ_ONCE() to obtain the individual pointer. Add a matching WRITE_ONCE() where the pointer are cleared.

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

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

	Issue introduced in 4.0 with commit b245be1f4db1a0394e4b6eb66059814b46670ac3 and fixed in 6.18.16 with commit f3e4cceafad27c9363c33622732f86722846ec6f
	Issue introduced in 4.0 with commit b245be1f4db1a0394e4b6eb66059814b46670ac3 and fixed in 6.19.6 with commit e4c6efb3b70ff87f1df99efce2f8893717695718
	Issue introduced in 4.0 with commit b245be1f4db1a0394e4b6eb66059814b46670ac3 and fixed in 7.0 with commit 983512f3a87fd8dc4c94dfa6b596b6e57df5aad7

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-43216

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:
include/net/sock.h
net/core/skbuff.c
net/socket.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/f3e4cceafad27c9363c33622732f86722846ec6f
	https://git.kernel.org/stable/c/e4c6efb3b70ff87f1df99efce2f8893717695718
	https://git.kernel.org/stable/c/983512f3a87fd8dc4c94dfa6b596b6e57df5aad7