CVE-2024-35878: of: module: prevent NULL pointer dereference in vsnprintf()
In the Linux kernel, the following vulnerability has been resolved:
of: module: prevent NULL pointer dereference in vsnprintf()
In ofmodalias(), 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 sizet parameter while ours is ssizet...
Found by Linux Verification Center (linuxtesting.org) with the Svace static analysis tool.
Other sources
In the Linux kernel, the following vulnerability has been resolved:
of: module: prevent NULL pointer dereference in vsnprintf()
The Linux kernel CVE team has assigned CVE-2024-35878 to this issue.
Upstream advisory: https://lore.kernel.org/linux-cve-announce/2024051943-CVE-2024-35878-5af8@gregkh/T
— Red Hat
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-35878?
CVE-2024-35878 has been classified with a severity level that indicates a potential impact on system stability due to a kernel oops.
How do I fix CVE-2024-35878?
To fix CVE-2024-35878, update the Linux kernel to version 6.6.26 or later for Red Hat and to 5.10.223-1, 5.10.226-1, 6.1.123-1, or 6.1.119-1 for Debian.
Which versions of the Linux kernel are affected by CVE-2024-35878?
CVE-2024-35878 impacts various kernels prior to version 6.6.26 for Red Hat and 5.10.223-1, 5.10.226-1, 6.1.123-1, and 6.1.119-1 for Debian.
What is the nature of the vulnerability CVE-2024-35878?
CVE-2024-35878 is a NULL pointer dereference vulnerability in the Linux kernel that can cause a kernel oops in the vsnprintf() function.
Are there any specific patches for CVE-2024-35878?
Yes, users should apply the relevant kernel updates provided by their distribution's package management system to patch CVE-2024-35878.