CVE-2024-56621: scsi: ufs: core: Cancel RTC work during ufshcd_remove()
In the Linux kernel, the following vulnerability has been resolved:
scsi: ufs: core: Cancel RTC work during ufshcdremove()
Currently, RTC work is only cancelled during ufshcdwlsuspend(). When ufshcd is removed in ufshcdremove(), RTC work is not cancelled. Due to this, any further trigger of the RTC work after ufshcdremove() would result in a NULL pointer dereference as below:
Unable to handle kernel NULL pointer dereference at virtual address 00000000000002a4 Workqueue: events ufshcdrtcwork Call trace: rawspinlockirqsave+0x34/0x8c pmruntimegetifactive+0x24/0xb4 ufshcdrtcwork+0x124/0x19c processscheduledworks+0x18c/0x2d8 workerthread+0x144/0x280 kthread+0x11c/0x128 retfromfork+0x10/0x20
Since RTC work accesses the ufshcd internal structures, it should be cancelled when ufshcd is removed. So do that in ufshcdremove(), as per the order in ufshcdinit().
Other sources
This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.
— Launchpad
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-56621?
CVE-2024-56621 has been classified with a moderate severity level.
How do I fix CVE-2024-56621?
To resolve CVE-2024-56621, you should update the Linux kernel to versions 6.12.6 or later.
What systems are affected by CVE-2024-56621?
CVE-2024-56621 affects the Linux kernel versions 6.8 to 6.12.5 and version 6.13-rc1.
What does CVE-2024-56621 involve?
CVE-2024-56621 involves a vulnerability where RTC work is not cancelled properly during the removal of the UFS host controller.
Is there a workaround for CVE-2024-56621?
Currently, there are no known workarounds for CVE-2024-56621 apart from applying the kernel update.