CVE-2026-143197: tun: disallow setting IEEE 802.15.4 and 6LoWPAN link types via TUNSETLINK
In the Linux kernel, the following vulnerability has been resolved:
tun: disallow setting IEEE 802.15.4 and 6LoWPAN link types via TUNSETLINK
A userspace application can set the link type of a TUN/TAP interface to ARPHRDIEEE802154, ARPHRDIEEE802154MONITOR, or ARPHRD6LOWPAN via ioctl(fd, TUNSETLINK, arg) because tungetaddrlen() explicitly recognized these types.
However, TUN devices cannot function as genuine IEEE 802.15.4 or 6LoWPAN interfaces:
1. They lack wpanphy, channels, PAN IDs, and MLME operations, and tun never initializes dev->ieee802154ptr or dev->mlpriv. When an unprivileged user creates a TUN interface in a user+net namespace, changes its link type to ARPHRDIEEE802154, and issues a netlink dump request (such as IEEE802154LLSECLISTKEY), ieee802154llsecdumptable() unconditionally dereferences dev->ieee802154ptr / ieee802154mlmeops(dev), triggering a supervisor null-pointer dereference / general protection fault. Similar dereferences occur across net/ieee802154/nl-phy.c (ieee802154deliface) and net/ieee802154/socket.c.
2. Similarly, the 6LoWPAN subsystem assumes via lowpandev(dev) that netdevpriv(dev) is struct lowpandev. On a TUN device, netdevpriv(dev) is struct tunstruct. On netdev events (such as NETDEVDOWN in net/6lowpan/core.c:lowpandeviceevent), it clears bits in lowpandev(dev)->ctx.table flags, which corrupts private memory inside tunstruct.
Rather than scattering checks across subsystems, fix the issue at the source: disallow setting ARPHRDIEEE802154, ARPHRDIEEE802154MONITOR, and ARPHRD6LOWPAN via TUNSETLINK by returning -EINVAL. Cast arg to unsigned short in the comparison to prevent upper-bit truncation bypasses (e.g. arg = ARPHRDIEEE802154 | 0x10000).
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.10.276 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.15.227 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.120 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.66 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.7 - Compensating control
In TUNSETLINK, disallow setting ARPHRD_IEEE802154, ARPHRD_IEEE802154_MONITOR, and ARPHRD_6LOWPAN; cast the argument to unsigned short in the comparison to prevent upper-bit truncation bypasses.
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Systems are exposed where an unprivileged user can create a TUN interface in a user and network namespace. The vulnerable paths are reached after that interface is assigned an IEEE 802.15.4, IEEE 802.15.4 monitor, or 6LoWPAN link type.
What does an attacker need to do to trigger the fault?
The attacker needs to create a TUN interface, use TUNSETLINK to assign one of the unsupported link types, and invoke a relevant netlink operation. An IEEE 802.15.4 netlink dump request, such as IEEE802154_LLSEC_LIST_KEY, can cause a null-pointer dereference or general protection fault.
What can be done before the fix is deployed?
Prevent unprivileged users from creating TUN interfaces in user and network namespaces where possible. This removes the interface-creation condition described for the trigger.