{"id":"CVE-2026-31700","published":"2026-05-01T13:56:00Z","modified":"2026-11-10T12:45:34Z","title":"net/packet: fix TOCTOU race on mmap'd vnet_hdr in tpacket_snd()","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/packet: fix TOCTOU race on mmap'd vnet_hdr in tpacket_snd()\n\nIn tpacket_snd(), when PACKET_VNET_HDR is enabled, vnet_hdr points\ndirectly into the mmap'd TX ring buffer shared with userspace. The\nkernel validates the header via __packet_snd_vnet_parse() but then\nre-reads all fields later in virtio_net_hdr_to_skb(). A concurrent\nuserspace thread can modify the vnet_hdr fields between validation\nand use, bypassing all safety checks.\n\nThe non-TPACKET path (packet_snd()) already correctly copies vnet_hdr\nto a stack-local variable. All other vnet_hdr consumers in the kernel\n(tun.c, tap.c, virtio_net.c) also use stack copies. The TPACKET TX\npath is the only caller of virtio_net_hdr_to_skb() that reads directly\nfrom user-controlled shared memory.\n\nFix this by copying vnet_hdr from the mmap'd ring buffer to a\nstack-local variable before validation and use, consistent with the\napproach used in packet_snd() and all other callers.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00153,"percentile":0.02301,"provenance":"source"},"cwes":[{"id":"CWE-367","name":"Time-of-check Time-of-use (TOCTOU) Race Condition"}],"references":[{"url":"https://git.kernel.org/stable/c/0f4c9754956b86de158a4af5278c5cf5bda9439e","tags":[]},{"url":"https://git.kernel.org/stable/c/714aa973da8163925eda7efd49361ccbee21ee46","tags":[]},{"url":"https://git.kernel.org/stable/c/1490f82353bdabc09265a74e645b07f05cf4188e","tags":[]},{"url":"https://git.kernel.org/stable/c/74e2db36fe50e3ad9d5300d7fd0e6e2a15a6d121","tags":[]},{"url":"https://git.kernel.org/stable/c/3a1bf9116ea31470b89692585c3910dfe830dcdd","tags":[]},{"url":"https://git.kernel.org/stable/c/28324a3b62d9ce7f9bdd65a8ce63f382041d1b27","tags":[]},{"url":"https://git.kernel.org/stable/c/48a6ef291a17639e1b6ae0fbe9c8b2bb87d7804b","tags":[]},{"url":"https://git.kernel.org/stable/c/2c054e17d9d41f1020376806c7f750834ced4dc5","tags":[]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-019113.html","tags":[]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-457936.html","tags":[]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-784472.html","tags":[]}],"priority":{"score":5.9,"factors":[{"name":"EPSS percentile","points":0.46},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= 1d036d25e5609ba73fee6a88db01c306b140d512, < 0f4c9754956b86de158a4af5278c5cf5bda9439e",">= 1d036d25e5609ba73fee6a88db01c306b140d512, < 714aa973da8163925eda7efd49361ccbee21ee46",">= 1d036d25e5609ba73fee6a88db01c306b140d512, < 1490f82353bdabc09265a74e645b07f05cf4188e",">= 1d036d25e5609ba73fee6a88db01c306b140d512, < 74e2db36fe50e3ad9d5300d7fd0e6e2a15a6d121",">= 1d036d25e5609ba73fee6a88db01c306b140d512, < 3a1bf9116ea31470b89692585c3910dfe830dcdd",">= 1d036d25e5609ba73fee6a88db01c306b140d512, < 28324a3b62d9ce7f9bdd65a8ce63f382041d1b27",">= 1d036d25e5609ba73fee6a88db01c306b140d512, < 48a6ef291a17639e1b6ae0fbe9c8b2bb87d7804b",">= 1d036d25e5609ba73fee6a88db01c306b140d512, < 2c054e17d9d41f1020376806c7f750834ced4dc5"]},{"vendor":"Linux","product":"Linux","versions":["4.6"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-10-16T15:12:43.080685Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2026-26509","exploited":false,"provenance":"source"}}