Overview
About vulnerability
In the Linux kernel, the following vulnerability has been resolved:
wifi: virt_wifi: remove SET_NETDEV_DEV to avoid use-after-free
Currently we execute SET_NETDEV_DEV(dev, &priv->lowerdev->dev) for
the virt_wifi net devices. However, unregistering a virt_wifi device in
netdev_run_todo() can happen together with the device referenced by
SET_NETDEV_DEV().
It can result in use-after-free during the ethtool operations performed
on a virt_wifi device that is currently being unregistered. Such a net
device can have the dev.parent field pointing to the freed memory,
but ethnl_ops_begin() calls pm_runtime_get_sync(dev->dev.parent).
Let’s remove SET_NETDEV_DEV for virt_wifi to avoid bugs like this:
================================================================== BUG: KASAN: slab-use-after-free in __pm_runtime_resume+0xe2/0xf0 Read of size 2 at addr ffff88810cfc46f8 by task pm/606
Call Trace:
This fix may be combined with another one in the ethtool subsystem: https://lore.kernel.org/all/[email protected]/T/#u
Details
- Affected product:
- Ubuntu 20.04 ELS
- Affected packages:
- linux @ 5.4.0 (+1 more)
Fixes
KernelCare state
Live-patch status from KernelCare for each operating system.
| Operating system | Status | Covered kernels |
|---|---|---|
| Amazon Linux 2023 | Planned | — |
| Debian 12 | In Rollout |
35 kernels
|
| Debian 13 | Planned | — |
| Ubuntu 22.04 | Planned | — |
| Ubuntu 24.04 | Planned | — |