{"id":"CVE-2026-52940","aliases":["CVE-2026-52940"],"related":[],"kind":"vulnerability","state":"published","title":"tun: zero the whole vnet header in tun_put_user()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\ntun: zero the whole vnet header in tun_put_user()\n\ntun_put_user() declares an on-stack struct virtio_net_hdr_v1_hash_tunnel\nwithout zeroing it. For a non-tunnel skb, virtio_net_hdr_tnl_from_skb()\nonly initializes the first 10 bytes (sizeof(struct virtio_net_hdr)),\nleaving bytes 10..23 (num_buffers and the hash/tunnel fields) as stack\ngarbage.\n\nAn unprivileged user can set the vnet header size to 24 with\nTUNSETVNETHDRSZ, so __tun_vnet_hdr_put() copies all 24 bytes of the\npartially-initialized struct to userspace, leaking 14 bytes of kernel\nstack on every read of a non-tunnel packet.\n\nFix it the same way tun_get_user() already does by zeroing the whole\nheader right after declaration.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\ntun: zero the whole vnet header in tun_put_user()\n\ntun_put_user() declares an on-stack struct virtio_net_hdr_v1_hash_tunnel\nwithout zeroing it. For a non-tunnel skb, virtio_net_hdr_tnl_from_skb()\nonly initializes the first 10 bytes (sizeof(struct virtio_net_hdr)),\nleaving bytes 10..23 (num_buffers and the hash/tunnel fields) as stack\ngarbage.\n\nAn unprivileged user can set the vnet header size to 24 with\nTUNSETVNETHDRSZ, so __tun_vnet_hdr_put() copies all 24 bytes of the\npartially-initialized struct to userspace, leaking 14 bytes of kernel\nstack on every read of a non-tunnel packet.\n\nFix it the same way tun_get_user() already does by zeroing the whole\nheader right after declaration.","source":"cvelist"}],"published":"2026-06-24T07:14:29.281Z","modified":"2026-07-08T19:12:57.360Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"288f30435132d2f9e7a29ec9b9745a4f9dc7fd37","fixed":"5fd1fa5a4254bfdd70571c77f5e3bcb4e43738d5","status":"affected"},{"type":"git","introduced":"288f30435132d2f9e7a29ec9b9745a4f9dc7fd37","fixed":"585cb85e9a29185be05f326369573c2663cf4380","status":"affected"},{"type":"git","introduced":"288f30435132d2f9e7a29ec9b9745a4f9dc7fd37","fixed":"7f2fcff15e99bb852f6967396ed12b38376e2c8d","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.17","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.17","status":"unaffected"},{"type":"semver","introduced":"6.18.36","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.0.13","lastAffected":"7.0.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"6.17","fixed":"6.18.36"},{"status":"affected","introduced":"6.19","fixed":"7.0.13"},{"status":"affected","version":"7.1"},{"status":"affected","version":"7.1"},{"status":"affected","version":"7.1"},{"status":"affected","version":"7.1"},{"status":"affected","version":"7.1"},{"status":"affected","version":"7.1"},{"status":"affected","version":"7.1"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/5fd1fa5a4254bfdd70571c77f5e3bcb4e43738d5","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/585cb85e9a29185be05f326369573c2663cf4380","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/7f2fcff15e99bb852f6967396ed12b38376e2c8d","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-52940","url":"https://www.cve.org/CVERecord?id=CVE-2026-52940","licence":"CVE Terms of Use","modified":"2026-06-24T07:14:29.281Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-52940","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-52940","licence":"Public domain","modified":"2026-07-08T19:12:57.360Z"}],"updatedAt":"2026-11-25T22:59:25.591Z","epss":{"score":0.00112,"percentile":0.01536,"date":"2026-12-01T12:00:22.000Z"}}