{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "288f30435132d2f9e7a29ec9b9745a4f9dc7fd37"
            },
            {
              "fixed": "5fd1fa5a4254bfdd70571c77f5e3bcb4e43738d5"
            },
            {
              "fixed": "585cb85e9a29185be05f326369573c2663cf4380"
            },
            {
              "fixed": "7f2fcff15e99bb852f6967396ed12b38376e2c8d"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Linux",
        "name": "Kernel"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "6.17.0"
            },
            {
              "fixed": "6.18.36"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.19.0"
            },
            {
              "fixed": "7.0.13"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/52xxx/CVE-2026-52940.json"
  },
  "details": "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.",
  "id": "CVE-2026-52940",
  "modified": "2026-07-10T03:54:51.273423393Z",
  "published": "2026-06-24T07:14:29.281Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/585cb85e9a29185be05f326369573c2663cf4380"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/5fd1fa5a4254bfdd70571c77f5e3bcb4e43738d5"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/7f2fcff15e99bb852f6967396ed12b38376e2c8d"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/52xxx/CVE-2026-52940.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-52940"
    },
    {
      "type": "PACKAGE",
      "url": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
    }
  ],
  "schema_version": "1.7.5",
  "summary": "tun: zero the whole vnet header in tun_put_user()"
}