CVE-2026-64376: firmware_loader: fix device reference leak in firmware_upload_register()
In the Linux kernel, the following vulnerability has been resolved:
firmwareloader: fix device reference leak in firmwareuploadregister()
firmwareuploadregister() -> fwcreateinstance() -> deviceinitialize()
After fwcreateinstance() succeeds, the lifetime of the embedded struct device is expected to be managed through the device core reference counting, since fwcreateinstance() has already called deviceinitialize().
In firmwareuploadregister(), if alloclookupfwpriv() fails after fwcreateinstance() succeeds, the code reaches freefwsysfs and frees fwsysfs directly instead of releasing the device reference with putdevice(). This may leave the reference count of the embedded struct device unbalanced, resulting in a refcount leak.
The issue was identified by a static analysis tool I developed and confirmed by manual review. Fix this by using putdevice(fwdev) in the failure path and letting fwdevrelease() handle the final cleanup, instead of freeing the instance directly from the error path.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
firmware_loaderto a version that resolves this vulnerability.Patch firmware_loader: fix device reference leak in firmware_upload_register()