wifi: virt_wifi: don't transfer operstate before register
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ c7cdba31ed8b87526db978976392802d3f93110c · < 293c56a66510bb7de073a1aba388e38abddff1fb| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
The Linux kernel’s virt_wifi component can queue an uninitialized network device for a later event when its lower device is dormant. If registration then fails, the device can be freed before that event runs, causing a use-after-free. The input does not specify attacker access or authentication requirements.
Engineers running Linux kernels with virt_wifi should check their kernel versions; affected versions are not specified.