CVE-2023-52765

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.
Configurations

No configuration.

History

03 Jul 2024, 01:43

Type Values Removed Values Added
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 6.2
CWE CWE-476
Summary
  • (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.

21 May 2024, 16:15

Type Values Removed Values Added
New CVE

Information

Published : 2024-05-21 16:15

Updated : 2024-07-03 01:43


NVD link : CVE-2023-52765

Mitre link : CVE-2023-52765

CVE.ORG link : CVE-2023-52765


JSON object : View

Products Affected

No product.

CWE
CWE-476

NULL Pointer Dereference