Bug 2373687 (CVE-2022-49951) - CVE-2022-49951 kernel: firmware_loader: Fix use-after-free during unregister
Summary: CVE-2022-49951 kernel: firmware_loader: Fix use-after-free during unregister
Keywords:
Status: NEW
Alias: CVE-2022-49951
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-06-18 12:13 UTC by OSIDB Bzimport
Modified: 2025-06-27 11:31 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-06-18 12:13:50 UTC
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().

Comment 1 Avinash Hanwate 2025-06-18 17:01:13 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025061810-CVE-2022-49951-bc9b@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.