CVE-2026-31700
Severity CVSS v4.0:
Pending analysis
Type:
CWE-362
Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
Publication date:
01/05/2026
Last modified:
06/05/2026
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
net/packet: fix TOCTOU race on mmap&#39;d vnet_hdr in tpacket_snd()<br />
<br />
In tpacket_snd(), when PACKET_VNET_HDR is enabled, vnet_hdr points<br />
directly into the mmap&#39;d TX ring buffer shared with userspace. The<br />
kernel validates the header via __packet_snd_vnet_parse() but then<br />
re-reads all fields later in virtio_net_hdr_to_skb(). A concurrent<br />
userspace thread can modify the vnet_hdr fields between validation<br />
and use, bypassing all safety checks.<br />
<br />
The non-TPACKET path (packet_snd()) already correctly copies vnet_hdr<br />
to a stack-local variable. All other vnet_hdr consumers in the kernel<br />
(tun.c, tap.c, virtio_net.c) also use stack copies. The TPACKET TX<br />
path is the only caller of virtio_net_hdr_to_skb() that reads directly<br />
from user-controlled shared memory.<br />
<br />
Fix this by copying vnet_hdr from the mmap&#39;d ring buffer to a<br />
stack-local variable before validation and use, consistent with the<br />
approach used in packet_snd() and all other callers.
Impact
Base Score 3.x
7.80
Severity 3.x
HIGH
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.6 (including) | 6.6.136 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7 (including) | 6.12.84 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.13 (including) | 6.18.25 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.19 (including) | 7.0.2 (excluding) |
| cpe:2.3:o:linux:linux_kernel:7.1:rc1:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:7.1:rc2:*:*:*:*:*:* |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/28324a3b62d9ce7f9bdd65a8ce63f382041d1b27
- https://git.kernel.org/stable/c/2c054e17d9d41f1020376806c7f750834ced4dc5
- https://git.kernel.org/stable/c/3a1bf9116ea31470b89692585c3910dfe830dcdd
- https://git.kernel.org/stable/c/48a6ef291a17639e1b6ae0fbe9c8b2bb87d7804b
- https://git.kernel.org/stable/c/74e2db36fe50e3ad9d5300d7fd0e6e2a15a6d121



