CVE-2026-31700: net/packet: fix TOCTOU race on mmap'd vnet_hdr in tpacket_snd()
Vulnerability summary
CVE-2026-31700 is a high (CVSS 7.8) vulnerability in linux. EPSS estimates a 0.11% chance of exploitation in the next 30 days, higher than 1.3% of scored vulnerabilities.
Not severe (CVSS 7.8, local access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 31 · Related 30Timeline
- 01-05-2026PublishedVulnerability first disclosed.
- 19-10-2026Last modifiedVulnerability information updated.
Description
In the Linux kernel, the following vulnerability has been resolved: net/packet: fix TOCTOU race on mmap'd vnet_hdr in tpacket_snd() In tpacket_snd(), when PACKET_VNET_HDR is enabled, vnet_hdr points directly into the mmap'd TX ring buffer shared with userspace. The kernel validates the header via __packet_snd_vnet_parse() but then re-reads all fields later in virtio_net_hdr_to_skb(). A concurrent userspace thread can modify the vnet_hdr fields between validation and use, bypassing all safety checks. The non-TPACKET path (packet_snd()) already correctly copies vnet_hdr to a stack-local variable. All other vnet_hdr consumers in the kernel (tun.c, tap.c, virtio_net.c) also use stack copies. The TPACKET TX path is the only caller of virtio_net_hdr_to_skb() that reads directly from user-controlled shared memory. Fix this by copying vnet_hdr from the mmap'd ring buffer to a stack-local variable before validation and use, consistent with the approach used in packet_snd() and all other callers.
CVSS metrics
6 scores · 5 sources · 2 versions- OSV · UbuntuEcosystem advisory · calculated7.8HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- OSV · DebianEcosystem advisory · calculated7.8HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- OSV · ChainguardEcosystem advisory · calculated7.8HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- NVDNIST7.8HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS trend
Probability
0.11%
Chance of exploitation in the next 30 days
Percentile
1%
Versus all other CVEs
30-day change
Decrease -0.04 pp
From 0.15% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root cause- CWE-362Concurrent Execution using Shared Resource with Improper SynchronizationThe product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence operating concurrently.
- CWE-367Time-of-check Time-of-use (TOCTOU) Race ConditionThe product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check.
Affected systems
Known conditions: local access, low-privilege account, no user interaction (CVSS vector). Other conditions: not stated in public data.
Ubuntu157 products
- linuxAll versions (No fix recorded) | < 5.15.0-198.208 | < 6.8.0-136.136 | < 7.0.0-27.27
- linux-allwinner-5.19All versions (No fix recorded)
- linux-awsAll versions (No fix recorded) | < 5.15.0-1117.124 | < 6.8.0-1061.64 | < 7.0.0-1008.8
- linux-aws-5.0All versions (No fix recorded)
- linux-aws-5.11All versions (No fix recorded)
Chainguard6 products
- linux-aws-6.18< 6.18.31-r0
- linux-azure-6.18< 6.18.31-r0 | < 6.18.24-r1
- linux-gcp-6.18< 6.18.31-r0
- linux-qemu-6.18< 6.18.24-r3
- linux-qemu-rc< 7.1_rc3-r0
Linux2 products
- linux≥ 1d036d25e5609ba73fee6a88db01c306b140d512, < 0f4c9754956b86de158a4af5278c5cf5bda9439e | ≥ 1d036d25e5609ba73fee6a88db01c306b140d512, < 714aa973da8163925eda7efd49361ccbee21ee46 | ≥ 1d036d25e5609ba73fee6a88db01c306b140d512, < 1490f82353bdabc09265a74e645b07f05cf4188e | ≥ 1d036d25e5609ba73fee6a88db01c306b140d512, < 74e2db36fe50e3ad9d5300d7fd0e6e2a15a6d121 | ≥ 1d036d25e5609ba73fee6a88db01c306b140d512, < 3a1bf9116ea31470b89692585c3910dfe830dcdd | ≥ 1d036d25e5609ba73fee6a88db01c306b140d512, < 28324a3b62d9ce7f9bdd65a8ce63f382041d1b27 | ≥ 1d036d25e5609ba73fee6a88db01c306b140d512, < 48a6ef291a17639e1b6ae0fbe9c8b2bb87d7804b | ≥ 1d036d25e5609ba73fee6a88db01c306b140d512, < 2c054e17d9d41f1020376806c7f750834ced4dc5 | 4.6
- linux_kernel≥ 4.6, < 6.6.136 | ≥ 6.7, < 6.12.84 | ≥ 6.13, < 6.18.25 | ≥ 6.19, < 7.0.2 | 7.1:rc1 | 7.1:rc2
Debian1 product
- linux< 6.1.176-1 | < 6.12.85-1 | < 7.0.3-1
4 vendors · 166 products