VDB

CVE-2026-31700

CVE-2026-31700 PUBLISHED CVSS 7.8 HIGH

net/packet: fix TOCTOU race on mmap'd vnet_hdr in tpacket_snd()

Reported by linux · Published May 1, 2026

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
kernel6.18-modules-extraAmazon Linux1:6.18.25-55.108.amzn2023
kernelAmazon Linux1:6.1.175-219.357.amzn2023
linux-aws-6.18Chainguard6.18.31-r0
bpftoolAmazon Linux1:6.1.175-219.357.amzn2023
kernel-livepatch-6.12.88-119.157Amazon Linux1:1.0-0.amzn2023
linux-vmware-6.18Chainguard6.18.31-r0
python3-perf6.18Amazon Linux1:6.18.25-55.108.amzn2023
kernel-toolsAmazon Linux1:6.1.175-219.357.amzn2023
perfAmazon Linux1:6.1.175-219.357.amzn2023
kernel6.12Amazon Linux1:6.12.88-119.157.amzn2023
kernel6.12-modules-extraAmazon Linux1:6.12.88-119.157.amzn2023

Risk scores

CVSS 3.1
7.8
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Affected products

VendorProductVersions
LinuxLinux1d036d25e5609ba73fee6a88db01c306b140d512, 1d036d25e5609ba73fee6a88db01c306b140d512, 1d036d25e5609ba73fee6a88db01c306b140d512
LinuxLinux4.6, 0, 5.10.259
amazon:2023kernel6.18-modules-extra0
amazon:2023kernel0
chainguardlinux-aws-6.180
amazon:2023bpftool0
amazon:2023kernel-livepatch-6.12.88-119.1570
SiemensSIMATIC S7-1500 CPU 1518-4 PN/DP MFP3.1.6, 3.1.7
chainguardlinux-vmware-6.180
SiemensSIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0)3.1.7, 3.1.6
SiemensSIMATIC S7-1500 CPU 1518F-4 PN/DP MFP3.1.7, 3.1.6
amazon:2023python3-perf6.180
amazon:2023kernel-tools0
amazon:2023perf0
amazon:2023kernel6.120
amazon:2023kernel6.12-modules-extra0
linuxlinux_kernel4.6, 4.6, 4.6
amazon:2023kernel-headers0
amazon:2023kernel6.18-modules-extra-common0
amazon:2023bpftool6.120

…and 33 more

Timeline

  • May 1, 2026 CVE Published
  • May 18, 2026 EPSS Score (24 in total, the first dated here)
  • Jun 2, 2026 Security Advisory (120 in total, the first dated here)
  • Jul 28, 2026 Coalition ESS Score
  • Aug 11, 2026 Distribution Patch (114 in total, the first dated here)

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2026-31700
vulnetix vdb fixes CVE-2026-31700

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2026-31700/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›