CVE-2024-35878
JSON

5.3medium

of: module: prevent NULL pointer dereference in vsnprintf()

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

Description

In the Linux kernel, the following vulnerability has been resolved: of: module: prevent NULL pointer dereference in vsnprintf() In of_modalias(), we can get passed the str and len parameters which would cause a kernel oops in vsnprintf() since it only allows passing a NULL ptr when the length is also 0. Also, we need to filter out the negative values of the len parameter as these will result in a really huge buffer since snprintf() takes size_t parameter while ours is ssize_t... Found by Linux Verification Center (linuxtesting.org) with the Svace static analysis tool.

Affected

Product or packageVersionsReported by
Linux Linuxfrom bd7a7ed774afd1a4174df34227626c95573be517 before e4a449368a2ce6d57a775d0ead27fc07f5a86e5b, from bd7a7ed774afd1a4174df34227626c95573be517 before 544561dc56f7e69a053c25e11e6170f48bb97898, from bd7a7ed774afd1a4174df34227626c95573be517 before a1aa5390cc912934fee76ce80af5f940452fa987, 6.4
Not affected: before 6.4, from 6.6.26 up to 6.6.*, from 6.8.5 up to 6.8.*, from 6.9 up to *
CVE List
linux linux_kernelbefore 6.6.26, from 6.7 before 6.8.5, 6.9NVD

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: of: module: prevent NULL pointer dereference in vsnprintf() In of_modalias(), we can get passed the str and len parameters which would cause a kernel oops in vsnprintf() since it only allows passing a NULL ptr when the length is also 0. Also, we need to filter out the negative values of the len parameter as these will result in a really huge buffer since snprintf() takes size_t parameter while ours is ssize_t... Found by Linux Verification Center (linuxtesting.org) with the Svace static analysis tool.

NVD (es)

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: de: módulo: evita la desreferencia del puntero NULL en vsnprintf() En of_modalias(), podemos pasar los parámetros str y len que provocarían un kernel ups en vsnprintf() ya que solo permite pasar un ptr NULL cuando la longitud también es 0. Además, necesitamos filtrar los valores negativos del parámetro len ya que estos darán como resultado un búfer realmente enorme ya que snprintf() toma el parámetro size_t mientras que el nuestro es ssize_t... Encontrado por el Centro de verificación de Linux (linuxtesting.org) con la herramienta de análisis estático Svace.

References

Sources

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