CVE-2023-52765
JSON

6.2medium

mfd: qcom-spmi-pmic: Fix revid implementation

Severity
6.2medium CVSS:3.1 by CISA-ADP
Exploit likelihood
0.25% (higher than 17% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

Description

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.

Affected

Product or packageVersionsReported by
Linux Linuxfrom e9c11c6e3a0e93903f5a13f8d2f97ae1bba512e1 before db98de0809f12b0edb9cd1be78e1ec1bfeba8f40, from e9c11c6e3a0e93903f5a13f8d2f97ae1bba512e1 before 4ce77b023d42a9f1062eecf438df1af4b4072eb2, from e9c11c6e3a0e93903f5a13f8d2f97ae1bba512e1 before affae18838db5e6b463ee30c821385695af56dc2, from e9c11c6e3a0e93903f5a13f8d2f97ae1bba512e1 before 7b439aaa62fee474a0d84d67a25f4984467e7b95, 6.0
Not affected: before 6.0, from 6.1.64 up to 6.1.*, from 6.5.13 up to 6.5.*, from 6.6.3 up to 6.6.*, from 6.7 up to *
CVE List
linux linux_kernele9c11c6e3a0e, 6.0, from 6.0 before 6.1.64, from 6.2 before 6.5.13, from 6.6 before 6.6.3
Not affected: 0, 6.1.64, 6.5.13, 6.6.3, 6.7
CVE List, NVD

Classification

CWE-476

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

NVD (es)

En el kernel de Linux, se resolvió la siguiente vulnerabilidad: mfd: qcom-spmi-pmic: reparación de la implementación revid. La implementación revid de Qualcomm SPMI PMIC está rota de varias maneras. En primer lugar, se supone que el hecho de que el dispositivo base hermano se haya registrado significa que también está vinculado a un controlador, lo que puede no ser el caso (por ejemplo, debido a un aplazamiento de la sonda o una sonda asincrónica). Esto podría desencadenar una desreferencia del puntero NULL al intentar acceder a los datos del controlador del dispositivo independiente. En segundo lugar, accede a los datos del controlador de un dispositivo hermano directamente y sin ningún bloqueo, lo que significa que los datos del controlador pueden liberarse mientras se accede a ellos (por ejemplo, al desvincular el controlador). En tercer lugar, filtra una referencia de dispositivo de estructura al dispositivo hermano que se busca usando spmi_device_from_of() cada vez que un dispositivo de función (secundario) llama a la función revid (por ejemplo, en la sonda). Solucione este problema volviendo a implementar la búsqueda revid para que se realice solo en la sonda del dispositivo PMIC; el dispositivo base obtiene la información revid del hardware, mientras que cualquier dispositivo SPMI secundario obtiene la información del dispositivo base y la almacena en caché para que sus hijos puedan acceder a ella de forma segura. Si el dispositivo base aún no ha sido sondeado, se pospone la sonda de un dispositivo secundario.

References

Sources

SourceRecordLicence
CVE ListCVE-2023-52765 changed 2026-05-11CVE Terms of Use
NVDCVE-2023-52765 changed 2026-06-17Public domain