CVE-2026-52940
tun: zero the whole vnet header in tun_put_user()
Check your servers for CVE-2026-52940
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-52940 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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)), 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.
Exploitation
EPSS 0.11%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 1.54% of all scored CVEs. Scores of 1 Dec 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 288f30435132d2f9e7a29ec9b9745a4f9dc7fd37, before 5fd1fa5a4254bfdd70571c77f5e3bcb4e43738d5 affected from 288f30435132d2f9e7a29ec9b9745a4f9dc7fd37, before 585cb85e9a29185be05f326369573c2663cf4380 affected from 288f30435132d2f9e7a29ec9b9745a4f9dc7fd37, before 7f2fcff15e99bb852f6967396ed12b38376e2c8d
Other versions: unaffected
|
| Linux |
affected 6.17 unaffected before 6.17 unaffected from 6.18.36 up to and including 6.18.* unaffected from 7.0.13 up to and including 7.0.* unaffected 7.1 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2026-52940 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-52940
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2026-52940
trivy image --scanners vuln IMAGE | grep CVE-2026-52940
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/5fd1fa5a4254bfdd70571c77f5e3bcb4e43738d5 git.kernel.org
- https://git.kernel.org/stable/c/585cb85e9a29185be05f326369573c2663cf4380 git.kernel.org
- https://git.kernel.org/stable/c/7f2fcff15e99bb852f6967396ed12b38376e2c8d git.kernel.org
Source: the record CVE-2026-52940 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse