CVE-2024-38559: scsi: qedf: Ensure the copied buf is NUL terminated
In the Linux kernel, the following vulnerability has been resolved:
scsi: qedf: Ensure the copied buf is NUL terminated
Currently, we allocate a count-sized kernel buffer and copy count from userspace to that buffer. Later, we use kstrtouint on this buffer but we don't ensure that the string is terminated inside the buffer, this can lead to OOB read when using kstrtouint. Fix this issue by using memdupusernul instead of memdupuser.
Other sources
In the Linux kernel, the following vulnerability has been resolved:
scsi: qedf: Ensure the copied buf is NUL terminated
The Linux kernel CVE team has assigned CVE-2024-38559 to this issue.
Upstream advisory: https://lore.kernel.org/linux-cve-announce/2024061953-CVE-2024-38559-3e03@gregkh/T
— Red Hat
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 4.19.316 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 5.4.278 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 5.10.219 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 5.15.161 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 6.1.93 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 6.6.33 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 6.8.12 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 6.9.3 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 6.10 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.94-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.8.12-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.107-1Fixed in 6.12.115-2Fixed in 7.2.12-1Fixed in 7.2.15-1 - Compensating control
In scsi/qedf, use memdup_user_nul instead of memdup_user when copying the userspace buffer, ensuring it is NUL terminated before passing it to kstrtouint.
Event History
Frequently Asked Questions
What is the severity of CVE-2024-38559?
The severity of CVE-2024-38559 is classified as moderate.
How do I fix CVE-2024-38559?
To fix CVE-2024-38559, update the kernel to the latest patched version according to your distribution's remediation guidelines.
Which systems are affected by CVE-2024-38559?
CVE-2024-38559 affects various versions of the Linux kernel across Red Hat and Debian distributions.
What does CVE-2024-38559 specifically address?
CVE-2024-38559 addresses a vulnerability related to proper null termination in user-space buffer copying in the Linux kernel.
Is there a known exploit for CVE-2024-38559?
As of the latest update, there are no publicly known exploits for CVE-2024-38559.