CVE-2024-42319: mailbox: mtk-cmdq: Move devm_mbox_controller_register() after devm_pm_runtime_enable()
In the Linux kernel, the following vulnerability has been resolved:
mailbox: mtk-cmdq: Move devmmboxcontrollerregister() after devmpmruntimeenable()
When mtk-cmdq unbinds, a WARNON message with condition pmruntimegetsync() < 0 occurs.
According to the call tracei below: cmdqmboxshutdown mboxfreechannel mboxcontrollerunregister devmmboxcontrollerunregister ...
The root cause can be deduced to be calling pmruntimegetsync() after calling pmruntimedisable() as observed below: 1. CMDQ driver uses devmmboxcontrollerregister() in cmdqprobe() to bind the cmdq device to the mboxcontroller, so devmmboxcontrollerunregister() will automatically unregister the device bound to the mailbox controller when the device-managed resource is removed. That means devmmboxcontrollerunregister() and cmdqmboxshoutdown() will be called after cmdqremove(). 2. CMDQ driver also uses devmpmruntimeenable() in cmdqprobe() after devmmboxcontrollerregister(), so that devmpmruntimedisable() will be called after cmdqremove(), but before devmmboxcontrollerunregister().
To fix this problem, cmdqprobe() needs to move devmmboxcontrollerregister() after devmpmruntimeenable() to make devmpmruntimedisable() be called after devmmboxcontrollerunregister().
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-42319?
CVE-2024-42319 has a severity rating that indicates it could lead to warnings and potential unbinding issues in the Linux kernel.
How do I fix CVE-2024-42319?
To fix CVE-2024-42319, update to the latest Linux kernel versions 6.1.123-1, 6.12.10-1, or 6.12.11-1.
Which Linux kernel versions are affected by CVE-2024-42319?
CVE-2024-42319 affects Linux kernel versions up to and including 6.1.119-1 and between 5.10.223-1 and 5.10.226-1.
What components are impacted by CVE-2024-42319?
CVE-2024-42319 impacts the mtk-cmdq mailbox functionality within the Linux kernel.
Is there a workaround for CVE-2024-42319?
There is no specific documented workaround for CVE-2024-42319; upgrading to a non-vulnerable version is recommended.