CVE-2026-52940: tun: zero the whole vnet header in tun_put_user()

Published Jun 24, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

tun: zero the whole vnet header in tunputuser()

tunputuser() declares an on-stack struct virtionethdrv1hashtunnel without zeroing it. For a non-tunnel skb, virtionethdrtnlfromskb() only initializes the first 10 bytes (sizeof(struct virtionethdr)), leaving bytes 10..23 (numbuffers and the hash/tunnel fields) as stack garbage.

An unprivileged user can set the vnet header size to 24 with TUNSETVNETHDRSZ, so tunvnethdrput() 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 tungetuser() already does by zeroing the whole header right after declaration.

Affected Software

10 affected components
Linux Linux kernel
Linux Linux kernel>=6.17<6.18.36
Linux Linux kernel>=6.19<7.0.13
Linux Linux kernel=7.1-rc1
Linux Linux kernel=7.1-rc2
Linux Linux kernel=7.1-rc3
Linux Linux kernel=7.1-rc4
Linux Linux kernel=7.1-rc5
Linux Linux kernel=7.1-rc6
Linux Linux kernel=7.1-rc7

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade linux kernel tun to a version that resolves this vulnerability.

    Fixed in TUNSETVNETHDRSZ
  2. Configuration

    Apply the kernel fix so tun_put_user() zeroes the entire virtio_net_hdr_v1_hash_tunnel/virtio_net_hdr buffer before __tun_vnet_hdr_put() copies it, preventing garbage/stack bytes 10..23 from being leaked to userspace on reads of non-tunnel packets.

    Linux kernel tun tun_put_user() vnet header initialization = zero the whole vnet header (set TUNSETVNETHDRSZ-related bytes to zero)

Event History

Jun 24, 2026
CVE Published
via MITRE·07:14 AM
Data Sourced
via MITRE·07:14 AM
Description
Data Sourced
via NVD·08:16 AM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-52940?

CVE-2026-52940 has a risk score of 45, indicating a medium severity vulnerability.

2

How do I fix CVE-2026-52940?

To fix CVE-2026-52940, update your Linux kernel to the latest stable version that includes the patch for this vulnerability.

3

What systems are affected by CVE-2026-52940?

CVE-2026-52940 affects the Linux kernel versions that contain the vulnerable code in tun_put_user().

4

What type of vulnerability is CVE-2026-52940?

CVE-2026-52940 is a memory handling vulnerability in the Linux kernel related to uninitialized memory in network packet handling.

5

Is CVE-2026-52940 being actively exploited?

As of now, there are no public reports indicating active exploitation of CVE-2026-52940.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203