{"id":81003,"date":"2026-06-24T10:44:29","date_gmt":"2026-06-24T07:14:29","guid":{"rendered":"https:\/\/afaghhosting.net\/blog\/cve-2026-52940-tun-zero-the-whole-vnet-header-in-tun_put_user\/"},"modified":"2026-06-24T10:44:29","modified_gmt":"2026-06-24T07:14:29","slug":"cve-2026-52940-tun-zero-the-whole-vnet-header-in-tun_put_user","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/cve-2026-52940-tun-zero-the-whole-vnet-header-in-tun_put_user\/","title":{"rendered":"CVE-2026-52940 &#8211; tun: zero the whole vnet header in tun_put_user()"},"content":{"rendered":"<p>CVE ID :CVE-2026-52940<\/p>\n<p>  Published : June 24, 2026, 7:14 a.m. | 2\u00a0hours, 29\u00a0minutes ago<\/p>\n<p>  Description :In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>tun: zero the whole vnet header in tun_put_user()<\/p>\n<p>tun_put_user() declares an on-stack struct virtio_net_hdr_v1_hash_tunnel<br \/>\nwithout zeroing it. For a non-tunnel skb, virtio_net_hdr_tnl_from_skb()<br \/>\nonly initializes the first 10 bytes (sizeof(struct virtio_net_hdr)),<br \/>\nleaving bytes 10..23 (num_buffers and the hash\/tunnel fields) as stack<br \/>\ngarbage.<\/p>\n<p>An unprivileged user can set the vnet header size to 24 with<br \/>\nTUNSETVNETHDRSZ, so __tun_vnet_hdr_put() copies all 24 bytes of the<br \/>\npartially-initialized struct to userspace, leaking 14 bytes of kernel<br \/>\nstack on every read of a non-tunnel packet.<\/p>\n<p>Fix it the same way tun_get_user() already does by zeroing the whole<br \/>\nheader right after declaration.<\/p>\n<p>  Severity: 0.0 | NA<\/p>\n<p>  Visit the link for more details, such as CVSS details, affected products, timeline, and more&#8230;\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CVE ID :CVE-2026-52940 Published : June 24, 2026, 7:14 a.m. | 2\u00a0hours, 29\u00a0minutes ago Description :In the Linux kernel, the following vulnerability has been resolved: tun: zero the whole vnet header in tun_put_user() tun_put_user() declares an on-stack struct virtio_net_hdr_v1_hash_tunnel without zeroing it. For a non-tunnel skb, virtio_net_hdr_tnl_from_skb() only initializes the first 10 bytes (sizeof(struct virtio_net_hdr)), &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-81003","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/81003","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=81003"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/81003\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=81003"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=81003"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=81003"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}