CVE-2022-49446: nvdimm: Fix firmware activation deadlock scenarios
In the Linux kernel, the following vulnerability has been resolved:
nvdimm: Fix firmware activation deadlock scenarios
Lockdep reports the following deadlock scenarios for CXL root device power-management, deviceprepare(), operations, and deviceshutdown() operations for 'ndregion' devices:
Chain exists of: &nvdimmregionkey --> &nvdimmbus->reconfigmutex --> systemtransitionmutex
Possible unsafe locking scenario:
CPU0 CPU1 ---- ---- lock(systemtransitionmutex); lock(&nvdimmbus->reconfigmutex); lock(systemtransitionmutex); lock(&nvdimmregionkey);
Chain exists of: &cxlnvdimmbridgekey --> acpiscanlock --> &cxlrootkey
Possible unsafe locking scenario:
CPU0 CPU1 ---- ---- lock(&cxlrootkey); lock(acpiscanlock); lock(&cxlrootkey); lock(&cxlnvdimmbridgekey);
These stem from holding nvdimmbuslock() over hibernatequietexec() which walks the entire system device topology taking devicelock() along the way. The nvdimmbuslock() is protecting against unregistration, multiple simultaneous ops callers, and preventing activateshow() from racing activatestore(). For the first 2, the lock is redundant. Unregistration already flushes all ops users, and sysfs already prevents multiple threads to be active in an ops handler at the same time. For the last userspace should already be waiting for its last activatestore() to complete, and does not need activateshow() to flush the write side, so this lock usage can be deleted in these attributes.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.18.5-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.10.127-1Fixed in 5.18.5-1
Event History
Frequently Asked Questions
What is the severity of CVE-2022-49446?
CVE-2022-49446 has a medium severity rating due to the potential for deadlock scenarios in CXL root device management.
How do I fix CVE-2022-49446?
To mitigate CVE-2022-49446, it is recommended to update the Linux kernel to a version that contains the fix for this vulnerability.
Which versions of the Linux kernel are affected by CVE-2022-49446?
CVE-2022-49446 affects Linux kernel versions between 5.9 and 5.10.121, and also versions from 5.11 to 5.15.46, 5.16 to 5.17.14, and 5.18 to 5.18.3.
What is the impact of CVE-2022-49446 on system performance?
The impact of CVE-2022-49446 can lead to system performance degradation due to potential deadlock situations during device power management.
Is a workaround available for CVE-2022-49446?
Currently, there are no documented workarounds for CVE-2022-49446; updating the kernel is the recommended approach.