bus: fsl-mc-bus: fix KASAN use-after-free in fsl_mc_bus_remove()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
bus: fsl-mc-bus: fix KASAN use-after-free in fsl_mc_bus_remove()
In fsl_mc_bus_remove(), mc->root_mc_bus_dev->mc_io is passed to fsl_destroy_mc_io(). However, mc->root_mc_bus_dev is already freed in fsl_mc_device_remove(). Then reference to mc->root_mc_bus_dev->mc_io triggers KASAN use-after-free. To avoid the use-after-free, keep the reference to mc->root_mc_bus_dev->mc_io in a local variable and pass to fsl_destroy_mc_io().
This patch needs rework to apply to kernels older than v5.15.
From the CVE record · Linux
The Linux kernel’s fsl-mc-bus removal path can access an mc_io reference after its device has been freed, triggering a KASAN use-after-free. The input does not establish whether an attacker can trigger the issue or specify network access, authentication, or user-interaction requirements.
Engineers running Linux kernels with fsl-mc-bus should check their kernel version; the affected version range is not specified.