CVE-2026-99281 in Linuxinfo

Summary

by MITRE • 11/07/2026

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

tun: Require CAP_NET_ADMIN to attach to an ownerless device

Twenty years ago I made creating a tuntap device require CAP_NET_ADMIN in commit ca6bb5d7ab22 ("[NET]: Require CAP_NET_ADMIN to create tuntap
devices.")

The idea was to allow the permissions on /dev/net/tun to be relaxed to 0666 and thus allow owners of tun devices assigned with TUNSETOWNER to actually open it and get at their devices.

What we missed at the time was that persistent devices with *no* owner were already essentially world-consumable, and anyone who could open the device node could also attach to those.

Even then, using persistent devices with no explicitly set owner — on the (false) presumption that CAP_NET_ADMIN would be required to open them — wasn't an egregious userspace bug. There are cases where it does make sense to separate the creation/configuration of the netdevice, from the process which shovels packets into it.

Since then, TUNSETGROUP was added a year later in commit 8c644623fe7e ("[NET]: Allow group ownership of TUN/TAP devices."). Its commit message
noted that if both uid and gid are set, both have to match (in itself a bizarre choice) — but still not that with *neither* set, no permission at all was required.

Then in 2012 commit c8d68e6be1c3 ("tuntap: multiqueue support") allowed new queues to be attached to a device from the moment of its creation, with no way for userspace to close the race between creation and a subsequent TUNSET{OWNER,GROUP}.

In 2024, commit 3ca459eaba1bf ("tun: fix group permission check") tried to fix things to be saner: only require the user *or* the group to match, in line with standard POSIX permissions, and require CAP_NET_ADMIN if neither the user nor group authorised the access (although it put the CAP_NET_ADMIN check first, and would wrongly have reported the capability as having been used even when it was not).

That fix was reverted in commit a70c7b3cbc06 ("tun: revert fix group permission check") due to allegedly causing a regression in an selinux test suite which *expected* the attachment to succeed when authorised by none of user, group, nor CAP_NET_ADMIN: https://lore.kernel.org/netdev/CAFqZXNtkCBT4f+PwyVRmQGoT3p1eVa01fCG_aNtpt6dakXncUg@mail.gmail.com/

We should not break UAPI. But we don't have to consider an selinux test case which deliberately exercises a security flaw to be UAPI worth preserving either. To which end, I have fixed it in selinux-testsuite commit b2f894f0016b ("tests/tun_tap: set an owner on the device for the relabel tests").

So: fix the lack of CAP_NET_ADMIN check on devices which *haven't* been assigned an owner or group, while leaving the weird tun ownership model as it was (user *and* group have to match, if both are set). If someone still wants to fix the latter (which wasn't actually the reason the previous attempt was reverted), they can do it under separate cover.

Permit attaching to an existing device only if an owner and/or group was set and the caller matches all that were set, or if the caller has CAP_NET_ADMIN. The only behavioural change is that a device with no owner or group now requires CAP_NET_ADMIN to attach — precisely the loophole we want to close.

And put the CAP_NET_ADMIN check in the right place this time.

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Analysis

by VulDB Data Team • 11/07/2026

The Linux kernel’s tun and tap subsystems historically contained a significant permission bypass vulnerability affecting devices that were created without an explicit owner or group assignment. This flaw originated from a design decision made two decades ago, where the requirement for CAP_NET_ADMIN was applied only to the creation of tuntap devices, allowing device node permissions to be relaxed to 0666 under the assumption that ownership controls would subsequently restrict access. However, this logic failed to account for persistent devices with no assigned owner or group, which remained effectively world-consumable. Any unprivileged user could open the device node and attach to these ownerless interfaces, bypassing intended security boundaries because the kernel did not enforce a capability check during the attachment phase for such specific configurations.

The technical flaw lies in the logic governing TUNSETOWNER and related ioctls used to bind processes to network devices. While later updates introduced group ownership features and multiqueue support, they perpetuated or failed to fully address this gap. A previous attempt to rectify this by enforcing POSIX-like permission checks was reverted due to a regression in an SELinux test suite that inadvertently relied on the insecure behavior. The current resolution corrects this oversight by ensuring that attaching to an existing tuntap device requires either matching the assigned owner and group credentials or possessing CAP_NET_ADMIN privileges if no such ownership is defined. This change closes the race condition window where devices could be exploited immediately after creation before any explicit permissions were set, thereby aligning the behavior with standard security expectations for network interface access control.

From an operational impact perspective, this vulnerability allowed unprivileged local users to intercept or inject traffic into virtual network interfaces that lacked specific ownership attributes. This could lead to unauthorized network monitoring, packet injection, or denial of service attacks against services relying on these interfaces. The fix ensures that only authorized processes with appropriate capabilities can interact with ownerless devices, significantly reducing the attack surface for lateral movement and privilege escalation within containerized or multi-tenant environments where such virtual interfaces are commonly deployed.

This vulnerability is categorized under CWE-269: Improper Privilege Management, as it involves a failure to enforce required privileges before performing an action that affects system security. In terms of MITRE ATT&CK mapping, this relates to techniques involving unauthorized access to network resources and potentially privilege escalation through improper handling of device permissions. Mitigations include applying the kernel patch that enforces CAP_NET_ADMIN checks for ownerless devices, ensuring that SELinux policies are updated to reflect correct permission models rather than relying on broken defaults, and auditing tuntap device configurations to ensure all persistent interfaces have explicit ownership attributes assigned during creation.

Responsible

Linux

Reservation

09/25/2026

Disclosure

11/07/2026

Moderation

accepted

EPSS

0.00000

KEV

no

Activities

very low

Sources

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!