{"id":"CVE-2022-49951","summary":"firmware_loader: Fix use-after-free during unregister","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nfirmware_loader: Fix use-after-free during unregister\n\nIn the following code within firmware_upload_unregister(), the call to\ndevice_unregister() could result in the dev_release function freeing the\nfw_upload_priv structure before it is dereferenced for the call to\nmodule_put(). This bug was found by the kernel test robot using\nCONFIG_KASAN while running the firmware selftests.\n\n  device_unregister(&fw_sysfs-\u003edev);\n  module_put(fw_upload_priv-\u003emodule);\n\nThe problem is fixed by copying fw_upload_priv-\u003emodule to a local variable\nfor use when calling device_unregister().","modified":"2026-04-11T12:44:44.826266Z","published":"2025-06-18T11:00:14.694Z","related":["SUSE-SU-2025:02264-1","SUSE-SU-2025:02321-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49951.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/8b40c38e37492b5bdf8e95b46b5cca9517a9957a"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d380d40930a674c520a5b55f3be1eb17dc634ebc"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49951.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-49951"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"97730bbb242cde22b7140acd202ffd88823886c9"},{"fixed":"d380d40930a674c520a5b55f3be1eb17dc634ebc"},{"fixed":"8b40c38e37492b5bdf8e95b46b5cca9517a9957a"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-49951.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.19.0"},{"fixed":"5.19.8"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-49951.json"}}],"schema_version":"1.7.5"}