CVE-2022-50616: regulator: core: Use different devices for resource allocation and DT lookup
In the Linux kernel, the following vulnerability has been resolved:
regulator: core: Use different devices for resource allocation and DT lookup
Following by the below discussion, there's the potential UAF issue between regulator and mfd. https://lore.kernel.org/all/20221128143601.1698148-1-yangyingliang@huawei.com/
From the analysis of Yingliang
CPU A |CPU B mt6370probe() | devmmfdadddevices() | |mt6370regulatorprobe() | regulatorregister() | //allocate initdata and add it to devres | regulatorofgetinitdata() i2cunregisterdevice() | devicedel() | devresreleaseall() | // initdata is freed | releasenodes() | | // using initdata causes UAF | regulatorregister()
It's common to use mfd core to create child device for the regulator. In order to do the DT lookup for init data, the child that registered the regulator would pass its parent as the parameter. And this causes init data resource allocated to its parent, not itself. The issue happen when parent device is going to release and regulator core is still doing some operation of init data constraint for the regulator of child device.
To fix it, this patch expand 'regulatorregister' API to use the different devices for init data allocation and DT lookup.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.4-1
Event History
Frequently Asked Questions
What is the severity of CVE-2022-50616?
CVE-2022-50616 is classified as a potential Use After Free (UAF) vulnerability in the Linux kernel.
How do I fix CVE-2022-50616?
To fix CVE-2022-50616, update your Linux kernel to the latest version where this vulnerability has been addressed.
What impact does CVE-2022-50616 have on affected systems?
CVE-2022-50616 may lead to security issues by allowing unauthorized access to system resources due to potential UAF issues.
Which Linux kernel versions are affected by CVE-2022-50616?
CVE-2022-50616 affects multiple versions of the Linux kernel that do not have the necessary patches applied.
Is CVE-2022-50616 exploitative in nature?
Yes, CVE-2022-50616 has the potential to be exploited if left unpatched, leading to critical security risks in affected systems.