CVE-2024-38559: scsi: qedf: Ensure the copied buf is NUL terminated

Published Jun 19, 2024
·
Updated

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

21 affected componentsFixes available
redhat/kernel<4.19.316
4.19.316
redhat/kernel<5.4.278
5.4.278
redhat/kernel<5.10.219
5.10.219
redhat/kernel<5.15.161
5.15.161
redhat/kernel<6.1.93
6.1.93
redhat/kernel<6.6.33
6.6.33
redhat/kernel<6.8.12
6.8.12
redhat/kernel<6.9.3
6.9.3
redhat/kernel<6.10
6.10
Linux Linux kernel>=4.11<4.19.316
Linux Linux kernel>=4.20<5.4.278
Linux Linux kernel>=5.5<5.10.219
Linux Linux kernel>=5.11<5.15.161
Linux Linux kernel>=5.16<6.1.93
Linux Linux kernel>=6.2<6.6.33
Linux Linux kernel>=6.7<6.8.12
Linux Linux kernel>=6.9<6.9.3
debian/linux<6.1.94-1
6.1.94-1
debian/linux<6.8.12-1
6.8.12-1
debian/linux<6.8.12-1
6.8.12-1
debian/linux
6.1.176-16.1.190-16.12.107-16.12.115-27.2.12-17.2.15-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade redhat/kernel to a version that resolves this vulnerability.

    Fixed in 4.19.316
  2. Upgrade

    Upgrade redhat/kernel to a version that resolves this vulnerability.

    Fixed in 5.4.278
  3. Upgrade

    Upgrade redhat/kernel to a version that resolves this vulnerability.

    Fixed in 5.10.219
  4. Upgrade

    Upgrade redhat/kernel to a version that resolves this vulnerability.

    Fixed in 5.15.161
  5. Upgrade

    Upgrade redhat/kernel to a version that resolves this vulnerability.

    Fixed in 6.1.93
  6. Upgrade

    Upgrade redhat/kernel to a version that resolves this vulnerability.

    Fixed in 6.6.33
  7. Upgrade

    Upgrade redhat/kernel to a version that resolves this vulnerability.

    Fixed in 6.8.12
  8. Upgrade

    Upgrade redhat/kernel to a version that resolves this vulnerability.

    Fixed in 6.9.3
  9. Upgrade

    Upgrade redhat/kernel to a version that resolves this vulnerability.

    Fixed in 6.10
  10. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.1.94-1
  11. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.8.12-1
  12. Upgrade

    Upgrade debian/linux to 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
  13. 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

Jun 19, 2024
CVE Published
via MITRE·01:35 PM
Data Sourced
via MITRE·01:35 PM
Description
Data Sourced
via NVD·02:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Data Sourced
via OSV·02:15 PM
DescriptionSeverityAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is the severity of CVE-2024-38559?

The severity of CVE-2024-38559 is classified as moderate.

2

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.

3

Which systems are affected by CVE-2024-38559?

CVE-2024-38559 affects various versions of the Linux kernel across Red Hat and Debian distributions.

4

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.

5

Is there a known exploit for CVE-2024-38559?

As of the latest update, there are no publicly known exploits for CVE-2024-38559.

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