CVE-2026-52940
tun: zero the whole vnet header in tun_put_user()
Reported by linux · Published June 24, 2026
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)), leaving bytes 10..23 (num_buffers and the hash/tunnel fields) as stack garbage. An unprivileged user can set the vnet header size to 24 with TUNSETVNETHDRSZ, so __tun_vnet_hdr_put() copies all 24 bytes of the partially-initialized struct to userspace, leaking 14 bytes of kernel stack on every read of a non-tunnel packet. Fix it the same way tun_get_user() already does by zeroing the whole header right after declaration.
EPSS 0.16% · 5.3th percentile
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| kernel6.18 | Amazon Linux | 1:6.18.36-69.134.amzn2023 |
| kernel6.18-tools-devel | Amazon Linux | 1:6.18.36-69.134.amzn2023 |
| linux-qemu-6.18 | Chainguard | 6.18.38-r0 |
| kernel-livepatch-6.18.36-69.134 | Amazon Linux | 1:1.0-0.amzn2023 |
| linux-azure-6.18 | Chainguard | 6.18.38-r0 |
| kernel6.18-modules-extra-common | Amazon Linux | 1:6.18.36-69.134.amzn2023 |
| linux-qemu-melange | Chainguard | 6.18.38-r0 |
| kernel6.18-modules-extra | Amazon Linux | 1:6.18.36-69.134.amzn2023 |
| kernel6.18-devel | Amazon Linux | 1:6.18.36-69.134.amzn2023 |
| bpftool6.18 | Amazon Linux | 1:6.18.36-69.134.amzn2023 |
| kernel6.18-headers | Amazon Linux | 1:6.18.36-69.134.amzn2023 |
| python3-perf6.18 | Amazon Linux | 1:6.18.36-69.134.amzn2023 |
2 more packages have a fixed version. See every fix in Lookup.
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 288f30435132d2f9e7a29ec9b9745a4f9dc7fd37, 288f30435132d2f9e7a29ec9b9745a4f9dc7fd37, 288f30435132d2f9e7a29ec9b9745a4f9dc7fd37 |
| Linux | Linux | 6.17, 0, 6.18.36 |
| amazon:2023 | kernel6.18 | 0 |
| amazon:2023 | kernel6.18-tools-devel | 0 |
| chainguard | linux-qemu-6.18 | 0 |
| amazon:2023 | kernel-livepatch-6.18.36-69.134 | 0 |
| chainguard | linux-azure-6.18 | 0 |
| amazon:2023 | kernel6.18-modules-extra-common | 0 |
| chainguard | linux-qemu-melange | 0 |
| amazon:2023 | kernel6.18-modules-extra | 0 |
| amazon:2023 | kernel6.18-devel | 0 |
| amazon:2023 | bpftool6.18 | 0 |
| amazon:2023 | kernel6.18-headers | 0 |
| amazon:2023 | python3-perf6.18 | 0 |
| amazon:2023 | microvm-kernel6.18 | 0 |
| linux | linux_kernel | 6.17, 6.17, 6.17 |
| Linux | Linux | 7.1, 0, 6.18.36 |
| amazon:2023 | kernel6.18-tools | 0 |
| amazon:2023 | perf6.18 | 0 |
| chainguard | linux-gcp-6.18 | 0 |
Timeline
- Jun 23, 2026 CVE Published
- Jun 25, 2026 Coalition ESS Score
- Jul 8, 2026 CVE Updated
- Aug 7, 2026 EPSS Score (7 in total, the first dated here)
- Aug 11, 2026 Distribution Patch (40 in total, the first dated here)
- Aug 11, 2026 Security Advisory (41 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2026-52940
vulnetix vdb fixes CVE-2026-52940
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-52940/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart