# CVE-2024-38560: scsi: bfa: Ensure the copied buf is NUL terminated

- Severity: High 7.1 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.34%, higher than 19% of CVEs (2026-11-30)
- Published: 2024-06-19T13:35:29.555Z
- Modified: 2026-10-15T01:18:28.987Z
- Weaknesses: CWE-125
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

scsi: bfa: Ensure the copied buf is NUL terminated

Currently, we allocate a nbytes-sized kernel buffer and copy nbytes from
userspace to that buffer. Later, we use sscanf on this buffer but we don't
ensure that the string is terminated inside the buffer, this can lead to
OOB read when using sscanf. Fix this issue by using memdup_user_nul instead
of memdup_user.

(As written by CVE List.)

## Affected

- Linux Linux: from 9f30b674759b9a2da25aefe25d885161d8a911cb before 481fc0c8617304a67649027c4a44723a139a0462; from 9f30b674759b9a2da25aefe25d885161d8a911cb before 595a6b98deec01b6dbb20139f71edcd5fb760ec2; from 9f30b674759b9a2da25aefe25d885161d8a911cb before 00b425ff0891283207d7bad607a2412225274d7a; from 9f30b674759b9a2da25aefe25d885161d8a911cb before 1708e3cf2488788cba5489e4f913d227de757baf; from 9f30b674759b9a2da25aefe25d885161d8a911cb before 7d3e694c4fe30f3aba9cd5ae86fb947a54c3db5c; from 9f30b674759b9a2da25aefe25d885161d8a911cb before 204714e68015d6946279719fd464ecaf57240f35; from 9f30b674759b9a2da25aefe25d885161d8a911cb before 7510fab46b1cbd1680e2a096e779aec3334b4143; from 9f30b674759b9a2da25aefe25d885161d8a911cb before ecb76200f5557a2886888aaa53702da1ab9e6cdf; from 9f30b674759b9a2da25aefe25d885161d8a911cb before 13d0cecb4626fae67c00c84d3c7851f6b62f7df3; 3.19 (not affected: before 3.19; from 4.19.316 up to 4.19.*; from 5.4.278 up to 5.4.*; from 5.10.219 up to 5.10.*; from 5.15.161 up to 5.15.*; from 6.1.93 up to 6.1.*; from 6.6.33 up to 6.6.*; from 6.8.12 up to 6.8.*; from 6.9.3 up to 6.9.*; from 6.10 up to *)
- linux linux_kernel: from 3.19 before 4.19.316; from 4.20 before 5.4.278; from 5.5 before 5.10.219; from 5.11 before 5.15.161; from 5.16 before 6.1.93; from 6.2 before 6.6.33; from 6.7 before 6.8.12; from 6.9 before 6.9.3

## References

- <https://git.kernel.org/stable/c/481fc0c8617304a67649027c4a44723a139a0462> (patch)
- <https://git.kernel.org/stable/c/595a6b98deec01b6dbb20139f71edcd5fb760ec2> (patch)
- <https://git.kernel.org/stable/c/00b425ff0891283207d7bad607a2412225274d7a> (patch)
- <https://git.kernel.org/stable/c/1708e3cf2488788cba5489e4f913d227de757baf> (patch)
- <https://git.kernel.org/stable/c/7d3e694c4fe30f3aba9cd5ae86fb947a54c3db5c> (patch)
- <https://git.kernel.org/stable/c/204714e68015d6946279719fd464ecaf57240f35> (patch)
- <https://git.kernel.org/stable/c/7510fab46b1cbd1680e2a096e779aec3334b4143> (patch)
- <https://git.kernel.org/stable/c/ecb76200f5557a2886888aaa53702da1ab9e6cdf> (patch)
- <https://git.kernel.org/stable/c/13d0cecb4626fae67c00c84d3c7851f6b62f7df3> (patch)
- <https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html>
- <https://cert-portal.siemens.com/productcert/html/ssa-265688.html>

## Sources

- CVE List: [CVE-2024-38560](https://www.cve.org/CVERecord?id=CVE-2024-38560), CVE Terms of Use, modified 2026-10-15
- NVD: [CVE-2024-38560](https://nvd.nist.gov/vuln/detail/CVE-2024-38560), Public domain, modified 2026-10-15

---

Page: https://cve.day/CVE-2024-38560 · Whole record: https://cve.day/CVE-2024-38560.json · Rebuilt by cve.day 2026-11-25T22:58:42.016Z
