CVE-2024-38541: of: module: add buffer overflow check in of_modalias()
In the Linux kernel, the following vulnerability has been resolved:
of: module: add buffer overflow check in ofmodalias()
In ofmodalias(), if the buffer happens to be too small even for the 1st snprintf() call, the len parameter will become negative and str parameter (if not NULL initially) will point beyond the buffer's end. Add the buffer overflow check after the 1st snprintf() call and fix such check after the strlen() call (accounting for the terminating NUL char).
Other sources
In the Linux kernel, the following vulnerability has been resolved:
of: module: add buffer overflow check in ofmodalias()
The Linux kernel CVE team has assigned CVE-2024-38541 to this issue.
Upstream advisory: https://lore.kernel.org/linux-cve-announce/2024061948-CVE-2024-38541-53d0@gregkh/T
— Red Hat
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-38541?
CVE-2024-38541 is classified as a medium severity vulnerability due to potential buffer overflow issues in the Linux kernel.
How do I fix CVE-2024-38541?
To fix CVE-2024-38541, update the Linux kernel to version 6.6.33 or later for Red Hat and 5.10.223-1 or 6.1.128-1 for Debian.
Which systems are affected by CVE-2024-38541?
CVE-2024-38541 affects various versions of the Linux kernel primarily on Red Hat and Debian distributions.
What causes the CVE-2024-38541 vulnerability?
CVE-2024-38541 is caused by a lack of proper buffer overflow checks in the of_modalias() function within the Linux kernel.
Are there any workarounds for CVE-2024-38541?
Currently, the recommended approach is to apply the necessary kernel updates as there are no known effective workarounds for CVE-2024-38541.