CVE-2023-52765·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: mfd: qcom-spmi-pmic: Fix revid implementation The Qualcomm SPMI PMIC revid implementation is broken in multiple ways. First, it assumes that just because the sibling base device has been registered that means that it is also bound to a driver, which may not be the case (e.g. due to probe deferral or asynchronous probe). This could trigger a NULL-pointer dereference when attempting to access the driver data of the unbound device. Second, it accesses driver data of a sibling device directly and without any locking, which means that the driver data may be freed while it is being accessed (e.g. on driver unbind). Third, it leaks a struct device reference to the sibling device which is looked up using the spmi_device_from_of() every time a function (child) device is calling the revid function (e.g. on probe). Fix this mess by reimplementing the revid lookup so that it is done only at probe of the PMIC device; the base device fetches the revid info from the hardware, while any secondary SPMI device fetches the information from the base device and caches it so that it can be accessed safely from its children. If the base device has not been probed yet then probe of a secondary device is deferred.
- Severity
- medium
- Software
- Kernel
- Fixed in
- 6.6.3
- Published
- 2024-05-21
Affected versions
From: 6.6
Until: 6.6.3
Fixed in: 6.6.3
How to fix this CVE
Update your Linux kernel to version 6.6.3 or later to resolve a critical flaw in the Qualcomm SPMI PMIC driver that can cause NULL pointer dereferences, race conditions, and memory leaks when accessing revision ID information. This patch ensures safe initialization and caching of PMIC revision data during device probe, preventing simultaneous access to unbound or freed driver structures.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Check kernel version: uname -r — verify the version is 6.6.3 or later
- Verify SPMI PMIC driver is loaded: lsmod | grep qcom_spmi_pmic
- Search system logs for NULL pointer dereference errors: sudo grep -i 'null pointer' /var/log/kern.log or journalctl -k | grep -i 'null pointer'
- Confirm patch applied by checking kernel config: grep CONFIG_MFD_QCOM_SPMI_PMIC /boot/config-$(uname -r) and grep CONFIG_SPMI /boot/config-$(uname -r)
- Test PMIC device enumeration: cat /sys/bus/spmi/devices/ to ensure devices are properly bound to drivers
FAQ
What is CVE-2023-52765?
CVE-2023-52765 is a medium-severity vulnerability in the Linux kernel's Qualcomm SPMI PMIC driver that causes NULL pointer dereferences, race conditions during concurrent access, and memory leaks when retrieving PMIC revision information. The driver incorrectly accessed sibling device data without proper synchronization or reference counting.
Is CVE-2023-52765 being actively exploited?
No, this vulnerability is not listed on the CISA KEV catalog and has no known public exploits. However, it can be triggered locally on affected systems through kernel initialization or driver probe sequences.
What versions of Kernel are affected by CVE-2023-52765?
Linux kernel versions 6.6 through 6.6.2 are affected. The fix was released in kernel 6.6.3.
How do I check if my server is vulnerable to CVE-2023-52765?
Run 'uname -r' and check if your kernel version is between 6.6 and 6.6.2. If so, you are vulnerable. Additionally, verify if the Qualcomm SPMI PMIC driver is enabled with 'grep CONFIG_MFD_QCOM_SPMI_PMIC /boot/config-$(uname -r)'.
Does Defensia detect CVE-2023-52765?
Yes — Defensia's CVE advisory scanner compares installed kernel versions against the NVD database. If your system runs a vulnerable kernel version (6.6.0–6.6.2), CVE-2023-52765 will appear in your dashboard with remediation steps and patch availability.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/4ce77b023d42a9f1062eecf438df1af4b4072eb2
- https://git.kernel.org/stable/c/7b439aaa62fee474a0d84d67a25f4984467e7b95
- https://git.kernel.org/stable/c/affae18838db5e6b463ee30c821385695af56dc2
- https://git.kernel.org/stable/c/db98de0809f12b0edb9cd1be78e1ec1bfeba8f40
- https://git.kernel.org/stable/c/4ce77b023d42a9f1062eecf438df1af4b4072eb2
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2023-52765. Free for 1 server.
Get started free