CVE-2026-99281 (GCVE-0-2026-99281)
Vulnerability from cvelistv5 – Published: 2026-11-07 14:08 – Updated: 2026-11-10 18:15
VLAI
EPSS
VEX
Title
tun: Require CAP_NET_ADMIN to attach to an ownerless device
Summary
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.
Severity
7.8 (High)
Assigner
Linux
CNA
References
Impacted products
2 products
| Vendor | Product | Version | |
|---|---|---|---|
| Linux | Linux |
Affected:
ca6bb5d7ab22ac79f608fe6cbc6b12de6a5a19f0 , < e0d98aab41b79b88609f33fb4d8e7a80ab8f648d
(git)
Affected: ca6bb5d7ab22ac79f608fe6cbc6b12de6a5a19f0 , < 2f92c0286cfd58bff9d6d54c01a771073d5eb775 (git) Affected: ca6bb5d7ab22ac79f608fe6cbc6b12de6a5a19f0 , < e53d1cf05da8ea58a5743b7ce5894fb51b0b9700 (git) Affected: ca6bb5d7ab22ac79f608fe6cbc6b12de6a5a19f0 , < ffdf678dd16610e3f006dac904bd37c09684673c (git) |
|
| Linux | Linux |
Affected:
2.6.18
Unaffected: 0 , < 2.6.18 (semver) Unaffected: 6.12.117 , ≤ 6.12.* (semver) Unaffected: 6.18.61 , ≤ 6.18.* (semver) Unaffected: 7.3.2 , ≤ 7.3.* (semver) Unaffected: 7.4-rc1 , ≤ * (original_commit_for_fix) |
{
"containers": {
"cna": {
"affected": [
{
"defaultStatus": "unaffected",
"product": "Linux",
"programFiles": [
"drivers/net/tun.c"
],
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"versions": [
{
"lessThan": "e0d98aab41b79b88609f33fb4d8e7a80ab8f648d",
"status": "affected",
"version": "ca6bb5d7ab22ac79f608fe6cbc6b12de6a5a19f0",
"versionType": "git"
},
{
"lessThan": "2f92c0286cfd58bff9d6d54c01a771073d5eb775",
"status": "affected",
"version": "ca6bb5d7ab22ac79f608fe6cbc6b12de6a5a19f0",
"versionType": "git"
},
{
"lessThan": "e53d1cf05da8ea58a5743b7ce5894fb51b0b9700",
"status": "affected",
"version": "ca6bb5d7ab22ac79f608fe6cbc6b12de6a5a19f0",
"versionType": "git"
},
{
"lessThan": "ffdf678dd16610e3f006dac904bd37c09684673c",
"status": "affected",
"version": "ca6bb5d7ab22ac79f608fe6cbc6b12de6a5a19f0",
"versionType": "git"
}
]
},
{
"defaultStatus": "affected",
"product": "Linux",
"programFiles": [
"drivers/net/tun.c"
],
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"versions": [
{
"status": "affected",
"version": "2.6.18"
},
{
"lessThan": "2.6.18",
"status": "unaffected",
"version": "0",
"versionType": "semver"
},
{
"lessThanOrEqual": "6.12.*",
"status": "unaffected",
"version": "6.12.117",
"versionType": "semver"
},
{
"lessThanOrEqual": "6.18.*",
"status": "unaffected",
"version": "6.18.61",
"versionType": "semver"
},
{
"lessThanOrEqual": "7.3.*",
"status": "unaffected",
"version": "7.3.2",
"versionType": "semver"
},
{
"lessThanOrEqual": "*",
"status": "unaffected",
"version": "7.4-rc1",
"versionType": "original_commit_for_fix"
}
]
}
],
"cpeApplicability": [
{
"nodes": [
{
"cpeMatch": [
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "6.12.117",
"versionStartIncluding": "2.6.18",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "6.18.61",
"versionStartIncluding": "2.6.18",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "7.3.2",
"versionStartIncluding": "2.6.18",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "7.4-rc1",
"versionStartIncluding": "2.6.18",
"vulnerable": true
}
],
"negate": false,
"operator": "OR"
}
]
}
],
"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 \u2014 on\nthe (false) presumption that CAP_NET_ADMIN would be required to open\nthem \u2014 wasn\u0027t 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) \u2014 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\u0027t 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\u0027t* 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\u0027t 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 \u2014 precisely the\nloophole we want to close.\n\nAnd put the CAP_NET_ADMIN check in the right place this time."
}
],
"metrics": [
{
"cvssV3_1": {
"baseScore": 7.8,
"baseSeverity": "HIGH",
"vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"version": "3.1"
},
"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-\u003euser_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-\u003ensproxy-\u003enet_ns, and tun_set_iff attaches only a device in that net. The impact is that namespace\u0027s 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\u0027s 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-\u003edev, 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."
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-11-10T18:15:28.611Z",
"orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"shortName": "Linux"
},
"references": [
{
"url": "https://git.kernel.org/stable/c/e0d98aab41b79b88609f33fb4d8e7a80ab8f648d"
},
{
"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"
}
}
},
"cveMetadata": {
"assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"assignerShortName": "Linux",
"cveId": "CVE-2026-99281",
"datePublished": "2026-11-07T14:08:47.735Z",
"dateReserved": "2026-09-25T10:25:14.405Z",
"dateUpdated": "2026-11-10T18:15:28.611Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
Loading…
Loading…
Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.
Experimental. This forecast is provided for visualization only and may change without notice. Do not use it for operational decisions.
Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline
Sightings and recorded dates, grouped by day · UTC
Loading timeline…
Loading…
Loading…
The MITRE ATT&CK techniques below are AI-generated suggestions, inferred from the description of the
vulnerability by the CIRCL/vulnerability-attack-technique-classification-roberta-base
model, served locally by ML-Gateway.
They have not been verified by an analyst and are provided for guidance only.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Loading…
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.