AZL-118313: CVE-2026-143197 affecting package kernel 6.6.161.1-1
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.
- Compensating control
Update TUNSETLINK validation to reject ARPHRD_IEEE802154, ARPHRD_IEEE802154_MONITOR, and ARPHRD_6LOWPAN, and cast the argument to unsigned short in the comparison to prevent upper-bit truncation bypasses.
Event History
Frequently Asked Questions
Who can trigger this issue?
An unprivileged user who can create a TUN interface in a user and network namespace can change its link type to IEEE 802.15.4 or 6LoWPAN and trigger affected subsystem paths.
What does exploitation require after creating the TUN interface?
The attacker must set the interface link type with the TUNSETLINK ioctl to ARPHRD_IEEE802154, ARPHRD_IEEE802154_MONITOR, or ARPHRD_6LOWPAN. They can then invoke relevant netlink operations, such as an IEEE802154_LLSEC_LIST_KEY dump request, to reach invalid dereferences.
What is the likely impact?
Affected paths can dereference uninitialized or incorrectly typed TUN device data, resulting in a supervisor null-pointer dereference or general protection fault. This can crash the kernel.