firmware_loader: Fix use-after-free during unregister
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:
firmware_loader: Fix use-after-free during unregister
In the following code within firmware_upload_unregister(), the call to device_unregister() could result in the dev_release function freeing the fw_upload_priv structure before it is dereferenced for the call to module_put(). This bug was found by the kernel test robot using CONFIG_KASAN while running the firmware selftests.
device_unregister(&fw_sysfs->dev); module_put(fw_upload_priv->module);
The problem is fixed by copying fw_upload_priv->module to a local variable for use when calling device_unregister().
From the CVE record · Linux
The Linux kernel’s firmware_loader has a use-after-free during firmware upload unregister: device_unregister() can free a structure before module_put() accesses it. The issue was found during firmware selftests; the input does not establish attacker capabilities, access requirements, or user interaction.
Engineers running the Linux kernel should check their deployments; affected versions are not specified.