CVE-2024-35878: of: module: prevent NULL pointer dereference in vsnprintf()

Published May 19, 2024
·
Updated

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

8 affected componentsFixes available
redhat/kernel<6.6.26
6.6.26
redhat/kernel<6.8.5
6.8.5
redhat/kernel<6.9
6.9
Linux Linux kernel<6.6.26
Linux Linux kernel>=6.7<6.8.5
Linux Linux kernel=6.9-rc1
Linux Linux kernel=6.9-rc2
debian/linux<=5.10.223-1, <=5.10.234-1, <=6.1.129-1, <=6.1.135-1
6.12.22-16.12.25-1

Event History

May 19, 2024
CVE Published
via MITRE·08:34 AM
Data Sourced
via MITRE·08:34 AM
Description
May 20, 2024
Data Sourced
via Red Hat·12:20 PM
DescriptionSeverityAffected Software
Jul 11, 2024
Data Sourced
via Launchpad·07:46 PM
Description
May 1, 2025
Data Sourced
via Ubuntu·12:22 AM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

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.

2

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.

3

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.

4

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.

5

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203