HIGH Introduced in 5.0
virt_wifi OperState UAF
CVE-2026-98311
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI7.8HIGH
01Description
In the Linux kernel, the following vulnerability has been resolved: wifi: virt_wifi: don't transfer operstate before register virt_wifi_newlink() calls netif_stacked_transfer_operstate() before register_netdevice(). If the lower device is dormant, that queues the new netdev on lweventlist while it is still uninitialized. If registration fails after that, for example because of an invalid name such as "bad/name", free_netdev() immediately frees the object. A later linkwatch_fire_event() then use-after-frees the list entry. Move the transfer to after netdev_upper_dev_link(), as macvlan and ipvlan already do.
02KernelScan AI Analysis
Risk summary
A local attacker who can create network devices (via CAP_NET_ADMIN, obtainable in an unprivileged user namespace) can trigger a use-after-free in the virt_wifi driver by forcing netdev registration to fail after the device has been queued on the linkwatch event list. This can lead to kernel memory corruption, privilege escalation, or denial of service. The virt_wifi module must be loaded for the vulnerability to be reachable.
Vulnerability analysis
When creating a virt_wifi virtual wireless interface, the driver transfers the operational state from the underlying device to the new interface before the new interface has been registered with the kernel. If the underlying device is in a dormant state, this transfer queues the not-yet-registered interface on the kernel's link-watch event list. If registration subsequently fails — for example because the requested interface name contains an invalid character — the partially initialized interface object is freed immediately, but its entry remains on the link-watch list. When the deferred link-watch work item later runs, it dereferences the freed object, resulting in a use-after-free. The fix moves the operational-state transfer to after successful interface registration, so a failed registration can never leave a stale entry on the link-watch list. The vulnerable code path is reached locally via rtnetlink device-creation requests and requires CAP_NET_ADMIN, which an unprivileged user can obtain inside a user namespace; the virt_wifi module must also be loaded.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 5.10 | 5.0 | 5.10.271 | ee9ea1afd699 |
| 5.15 | 5.0 | 5.15.222 | 9ce26201f6de |
| 6.1 | 5.0 | 6.1.189 | f9526054c2b2 |
| 6.12 | 5.0 | 6.12.112 | ca49763c42c1 |
| 6.18 | 5.0 | 6.18.54 | 293c56a66510 |
| 6.6 | 5.0 | 6.6.158 | e8304e25c6da |
| 7.2 | 5.0 | 7.2.8 | b808a9af5fd2 |
| mainline | 5.0 | 7.3 | e5c8d7acd31b |
| cip/5.10 | 5.0 | 5.10.271-cip78 | ee9ea1afd699 |
| cip/5.10-rt | 5.0 | 5.10.272-cip79-rt35 | ee9ea1afd699 |
| cip/6.1 | 5.0 | 6.1.189-cip61 | f9526054c2b2 |
| cip/6.1-rt | 5.0 | 6.1.189-cip61-rt32 | f9526054c2b2 |
| cip/6.12 | 5.0 | 6.12.112-cip33 | ca49763c42c1 |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Fixed in 6.12.112-cip33 |
| cip/6.1 | Fixed in 6.1.189-cip61 |
| cip/6.1-rt | Fixed in 6.1.189-cip61-rt32 |
| cip/5.10 | Fixed in 5.10.271-cip78 |
| cip/5.10-rt | Fixed in 5.10.272-cip79-rt35 |