KernelScan.io

HIGH Introduced in 5.0

virt_wifi OperState UAF

CVE-2026-98311

CVSS 7.8 / 10.0 NVD

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

KernelScan AI7.8HIGH

01

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.

02

Engine v0.7.0

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.

Affecteddrivers/net/wireless/virtual/virt_wifi.c (virt_wifi)

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.

03

BranchIntroducedFixed inPatch commit
5.105.05.10.271ee9ea1afd699
5.155.05.15.2229ce26201f6de
6.15.06.1.189f9526054c2b2
6.125.06.12.112ca49763c42c1
6.185.06.18.54293c56a66510
6.65.06.6.158e8304e25c6da
7.25.07.2.8b808a9af5fd2
mainline5.07.3e5c8d7acd31b
cip/5.105.05.10.271-cip78ee9ea1afd699
cip/5.10-rt5.05.10.272-cip79-rt35ee9ea1afd699
cip/6.15.06.1.189-cip61f9526054c2b2
cip/6.1-rt5.06.1.189-cip61-rt32f9526054c2b2
cip/6.125.06.12.112-cip33ca49763c42c1

04

State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.

CIP treeState
cip/6.12Fixed in 6.12.112-cip33
cip/6.1Fixed in 6.1.189-cip61
cip/6.1-rtFixed in 6.1.189-cip61-rt32
cip/5.10Fixed in 5.10.271-cip78
cip/5.10-rtFixed in 5.10.272-cip79-rt35