{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-99281",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2026-09-25T10:25:14.405Z",
        "datePublished": "2026-11-07T14:08:47.735Z",
        "dateUpdated": "2026-11-10T16:57:40.816Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-11-10T16:57:40.816Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ntun: Require CAP_NET_ADMIN to attach to an ownerless device\n\nTwenty years ago I made creating a tuntap device require CAP_NET_ADMIN\nin commit ca6bb5d7ab22 (\"[NET]: Require CAP_NET_ADMIN to create tuntap\ndevices.\")\n\nThe idea was to allow the permissions on /dev/net/tun to be relaxed to\n0666 and thus allow owners of tun devices assigned with TUNSETOWNER to\nactually open it and get at their devices.\n\nWhat we missed at the time was that persistent devices with *no* owner\nwere already essentially world-consumable, and anyone who could open\nthe device node could also attach to those.\n\nEven then, using persistent devices with no explicitly set owner — on\nthe (false) presumption that CAP_NET_ADMIN would be required to open\nthem — wasn't an egregious userspace bug. There are cases where it does\nmake sense to separate the creation/configuration of the netdevice, from\nthe process which shovels packets into it.\n\nSince then, TUNSETGROUP was added a year later in commit 8c644623fe7e\n(\"[NET]: Allow group ownership of TUN/TAP devices.\"). Its commit message\nnoted that if both uid and gid are set, both have to match (in itself a\nbizarre choice) — but still not that with *neither* set, no permission\nat all was required.\n\nThen in 2012 commit c8d68e6be1c3 (\"tuntap: multiqueue support\") allowed\nnew queues to be attached to a device from the moment of its creation,\nwith no way for userspace to close the race between creation and a\nsubsequent TUNSET{OWNER,GROUP}.\n\nIn 2024, commit 3ca459eaba1bf (\"tun: fix group permission check\") tried\nto fix things to be saner: only require the user *or* the group to\nmatch, in line with standard POSIX permissions, and require\nCAP_NET_ADMIN if neither the user nor group authorised the access\n(although it put the CAP_NET_ADMIN check first, and would wrongly have\nreported the capability as having been used even when it was not).\n\nThat fix was reverted in commit a70c7b3cbc06 (\"tun: revert fix group\npermission check\") due to allegedly causing a regression in an selinux\ntest suite which *expected* the attachment to succeed when authorised\nby none of user, group, nor CAP_NET_ADMIN:\nhttps://lore.kernel.org/netdev/CAFqZXNtkCBT4f+PwyVRmQGoT3p1eVa01fCG_aNtpt6dakXncUg@mail.gmail.com/\n\nWe should not break UAPI. But we don't have to consider an selinux test\ncase which deliberately exercises a security flaw to be UAPI worth\npreserving either. To which end, I have fixed it in selinux-testsuite\ncommit b2f894f0016b (\"tests/tun_tap: set an owner on the device for the\nrelabel tests\").\n\nSo: fix the lack of CAP_NET_ADMIN check on devices which *haven't* been\nassigned an owner or group, while leaving the weird tun ownership model\nas it was (user *and* group have to match, if both are set). If someone\nstill wants to fix the latter (which wasn't actually the reason the\nprevious attempt was reverted), they can do it under separate cover.\n\nPermit attaching to an existing device only if an owner and/or group was\nset and the caller matches all that were set, or if the caller has\nCAP_NET_ADMIN. The only behavioural change is that a device with no\nowner or group now requires CAP_NET_ADMIN to attach — precisely the\nloophole we want to close.\n\nAnd put the CAP_NET_ADMIN check in the right place this time."
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                        "baseScore": 7.8,
                        "baseSeverity": "HIGH"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:L - The attacker reaches the patched check by opening /dev/net/tun in tun_chr_open and issuing TUNSETIFF; __tun_chr_ioctl copies the ifreq and tun_set_iff looks the device up with __dev_get_by_name. The triggering input is that ioctl, on the ownerless branch of the old tun_not_capable predicate.\nAC:L - tun_setup stores INVALID_UID and INVALID_GID, so the old tun_not_capable predicate is false with no race. After the creator of an IFF_PERSIST device closes it, numqueues is 0 and tun_attach from TUNSETIFF succeeds on every try; an IFF_MULTI_QUEUE device accepts another queue the same way.\nPR:L - The ownerless path in the old tun_not_capable returns false without calling ns_capable(net->user_ns, CAP_NET_ADMIN). tun_chr_open has no capability check, and /dev/net/tun is mode 0666, so any local user can issue that TUNSETIFF. The caller is an unprivileged local user.\nUI:N - The attacker alone opens /dev/net/tun and passes the interface name to TUNSETIFF. That ioctl is the whole trigger.\nS:U - tun_chr_open binds the fd to current->nsproxy->net_ns, and tun_set_iff attaches only a device in that net. The impact is that namespace's tun packet queue and the tun ioctls on the resulting fd, under the same security authority as the caller.\nC:H - tun_net_xmit queues the device's egress skbs on the attached tfile, and tun_chr_read_iter, tun_do_read, and tun_put_user copy each full skb to the attacker. On a single-queue device that is every packet the host transmits on that interface.\nI:H - tun_chr_write_iter calls tun_get_user, which copies the attacker buffer into an skb, sets skb->dev, and injects it through netif_rx as ingress. On that same fd, __tun_chr_ioctl handles SIOCSIFHWADDR, TUNSETTXFILTER, TUNSETOWNER, and set_offload with no further capability check.\nA:H - Once numqueues is 1, a non-multiqueue tun_attach returns -EBUSY, so the legitimate opener cannot reclaim the device. TUNSETCARRIER calls netif_carrier_off, and TUNSETPERSIST(0) followed by close makes __tun_detach call unregister_netdevice and delete the interface."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/net/tun.c"
                    ],
                    "versions": [
                        {
                            "version": "ca6bb5d7ab22ac79f608fe6cbc6b12de6a5a19f0",
                            "lessThan": "2f92c0286cfd58bff9d6d54c01a771073d5eb775",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "ca6bb5d7ab22ac79f608fe6cbc6b12de6a5a19f0",
                            "lessThan": "e53d1cf05da8ea58a5743b7ce5894fb51b0b9700",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "ca6bb5d7ab22ac79f608fe6cbc6b12de6a5a19f0",
                            "lessThan": "ffdf678dd16610e3f006dac904bd37c09684673c",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/net/tun.c"
                    ],
                    "versions": [
                        {
                            "version": "2.6.18",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "2.6.18",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.18.61",
                            "lessThanOrEqual": "6.18.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.3.2",
                            "lessThanOrEqual": "7.3.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.4-rc1",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.18",
                                    "versionEndExcluding": "6.18.61"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.18",
                                    "versionEndExcluding": "7.3.2"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.18",
                                    "versionEndExcluding": "7.4-rc1"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/2f92c0286cfd58bff9d6d54c01a771073d5eb775"
                },
                {
                    "url": "https://git.kernel.org/stable/c/e53d1cf05da8ea58a5743b7ce5894fb51b0b9700"
                },
                {
                    "url": "https://git.kernel.org/stable/c/ffdf678dd16610e3f006dac904bd37c09684673c"
                }
            ],
            "title": "tun: Require CAP_NET_ADMIN to attach to an ownerless device",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}