CVE-2026-31700
Vulnerability Summary
Timeline
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
- v4.0•HIGH•Score: 7.3CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
- v3.1•HIGH•Score: 7.8CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS Trends
Current EPSS score: 0.11%• Percentile: 1%
Techniques & Countermeasures
- CWE-362•Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
The 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.
Affected Systems
- chainguard•linux-aws-6.18
< 6.18.31-r0
- chainguard•linux-azure-6.18
< 6.18.31-r0 | < 6.18.24-r1
- chainguard•linux-gcp-6.18
< 6.18.31-r0
- chainguard•linux-qemu-6.18
< 6.18.24-r3
- chainguard•linux-qemu-rc
< 7.1_rc3-r0
- chainguard•linux-vmware-6.18
< 6.18.31-r0
- debian•linux
< 5.10.259-1 | < 6.1.176-1 | < 6.12.85-1 | < 7.0.3-1
- debian•linux-6.1
< 6.1.176-1~deb11u1
- ubuntu•linux
all | all | < 6.8.0-136.136 | all | < 7.0.0-27.27
- ubuntu•linux-allwinner-5.19
all
- ubuntu•linux-aws
all | all | < 6.8.0-1061.64 | all | < 7.0.0-1008.8
- ubuntu•linux-aws-5.0
all
- ubuntu•linux-aws-5.11
all
- ubuntu•linux-aws-5.13
all
- ubuntu•linux-aws-5.15
all
- ubuntu•linux-aws-5.19
all
- ubuntu•linux-aws-5.3
all
- ubuntu•linux-aws-5.4
all
- ubuntu•linux-aws-5.8
all
- ubuntu•linux-aws-6.14
all
- ubuntu•linux-aws-6.17
all
- ubuntu•linux-aws-6.2
all
- ubuntu•linux-aws-6.5
all
- ubuntu•linux-aws-6.8
< 6.8.0-1061.64~22.04.1
- ubuntu•linux-aws-fips
all | < 6.8.0-1061.64+fips1
- ubuntu•linux-aws-hwe
all
- ubuntu•linux-azure
all | all | all | < 6.8.0-1063.71 | all | < 7.0.0-1010.10
- ubuntu•linux-azure-4.15
all
- ubuntu•linux-azure-5.11
all
- ubuntu•linux-azure-5.13
all
- ubuntu•linux-azure-5.15
all
- ubuntu•linux-azure-5.19
all
- ubuntu•linux-azure-5.3
all
- ubuntu•linux-azure-5.4
all
- ubuntu•linux-azure-5.8
all
- ubuntu•linux-azure-6.11
all
- ubuntu•linux-azure-6.14
all
- ubuntu•linux-azure-6.17
all
- ubuntu•linux-azure-6.2
all
- ubuntu•linux-azure-6.5
all
- ubuntu•linux-azure-6.8
< 6.8.0-1063.71~22.04.1
- ubuntu•linux-azure-edge
all
- ubuntu•linux-azure-fde
all | all | < 6.8.0-1062.69 | all | < 7.0.0-1009.9
- ubuntu•linux-azure-fde-5.15
all
- ubuntu•linux-azure-fde-5.19
all
- ubuntu•linux-azure-fde-6.14
all
- ubuntu•linux-azure-fde-6.2
all
- ubuntu•linux-azure-fde-6.8
< 6.8.0-1062.69~22.04.1
- ubuntu•linux-azure-fips
all | < 6.8.0-1063.71+fips2
- ubuntu•linux-azure-nvidia
all
Showing first 50 affected entries in server-rendered view.
References (35)
- https://git.kernel.org/stable/c/74e2db36fe50e3ad9d5300d7fd0e6e2a15a6d121
- https://git.kernel.org/stable/c/3a1bf9116ea31470b89692585c3910dfe830dcdd
- https://git.kernel.org/stable/c/28324a3b62d9ce7f9bdd65a8ce63f382041d1b27
- https://git.kernel.org/stable/c/48a6ef291a17639e1b6ae0fbe9c8b2bb87d7804b
- https://git.kernel.org/stable/c/2c054e17d9d41f1020376806c7f750834ced4dc5
- https://git.kernel.org/stable/c/0f4c9754956b86de158a4af5278c5cf5bda9439e
- https://git.kernel.org/stable/c/714aa973da8163925eda7efd49361ccbee21ee46
- https://git.kernel.org/stable/c/1490f82353bdabc09265a74e645b07f05cf4188e
- https://ubuntu.com/security/CVE-2026-31700
- https://www.cve.org/CVERecord?id=CVE-2026-31700
- https://git.kernel.org/linus/2c054e17d9d41f1020376806c7f750834ced4dc5
- https://ubuntu.com/security/notices/USN-8488-1
- https://ubuntu.com/security/notices/USN-8488-2
- https://ubuntu.com/security/notices/USN-8507-1
- https://ubuntu.com/security/notices/USN-8569-1
- https://ubuntu.com/security/notices/USN-8567-1
- https://ubuntu.com/security/notices/USN-8574-1
- https://ubuntu.com/security/notices/USN-8574-2
- https://ubuntu.com/security/notices/USN-8595-1
- https://ubuntu.com/security/notices/USN-8596-1
- https://ubuntu.com/security/notices/USN-8603-1
- https://ubuntu.com/security/notices/USN-8595-2
- https://ubuntu.com/security/notices/USN-8606-1
- https://ubuntu.com/security/notices/USN-8607-1
- https://ubuntu.com/security/notices/USN-8608-1
- https://ubuntu.com/security/notices/USN-8609-1
- https://ubuntu.com/security/notices/USN-8574-3
- https://ubuntu.com/security/notices/USN-8595-3
- https://ubuntu.com/security/notices/USN-8619-1
- https://security-tracker.debian.org/tracker/CVE-2026-31700
- https://ubuntu.com/security/notices/USN-8665-1
- https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31700.json
- https://nvd.nist.gov/vuln/detail/CVE-2026-31700
- https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
- https://cert-portal.siemens.com/productcert/html/ssa-019113.html