CVE-2023-54026: opp: Fix use-after-free in lazy_opp_tables after probe deferral
In the Linux kernel, the following vulnerability has been resolved:
opp: Fix use-after-free in lazyopptables after probe deferral
When devpmoppoffindiccpaths() in allocateopptable() returns -EPROBEDEFER, the opptable is freed again, to wait until all the interconnect paths are available.
However, if the OPP table is using required-opps then it may already have been added to the global lazyopptables list. The error path does not remove the opptable from the list again.
This can cause crashes later when the provider of the required-opps is added, since we will iterate over OPP tables that have already been freed. E.g.:
Unable to handle kernel NULL pointer dereference when read CPU: 0 PID: 7 Comm: kworker/0:0 Not tainted 6.4.0-rc3 PC is at ofaddopptablev2 (include/linux/of.h:949 drivers/opp/of.c:98 drivers/opp/of.c:344 drivers/opp/of.c:404 drivers/opp/of.c:1032) -> lazylinkrequiredopptable()
Fix this by calling ofclearopptable() to remove the opptable from the list and clear other allocated resources. While at it, also add the missing mutexdestroy() calls in the error path.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2023-54026?
CVE-2023-54026 is classified as a high-severity vulnerability due to the potential for use-after-free exploitation in the Linux kernel.
How do I fix CVE-2023-54026?
To fix CVE-2023-54026, update your Linux kernel to the latest version where the vulnerability has been patched.
Which versions of the Linux kernel are affected by CVE-2023-54026?
CVE-2023-54026 affects multiple versions of the Linux kernel prior to the patch release that addresses this vulnerability.
What are the potential impacts of CVE-2023-54026?
The potential impacts of CVE-2023-54026 include system instability and exploitation opportunities that could lead to arbitrary code execution.
How was CVE-2023-54026 discovered?
CVE-2023-54026 was discovered through code review and testing that identified a use-after-free condition in the lazy_opp_tables function.