# CVE-2024-36931: s390/cio: 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.23%, higher than 15% of CVEs (2026-12-01)
- Published: 2024-05-30T15:29:22.601Z
- Modified: 2026-06-17T07:37:23.387Z
- 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:

s390/cio: Ensure the copied buf is NUL terminated

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

(As written by CVE List.)

## Affected

- Linux Linux: from a4f17cc726712a52122ad38540bc3ff3a052d1a4 before c9d48ce163305595ae20aee27774192476d5e6a5; from a4f17cc726712a52122ad38540bc3ff3a052d1a4 before 10452edd175fcc4fd0f5ac782ed2a002e3e5d65c; from a4f17cc726712a52122ad38540bc3ff3a052d1a4 before 84b38f48836662c4bfae646c014f4e981e16a2b2; from a4f17cc726712a52122ad38540bc3ff3a052d1a4 before 06759ebaf75c19c87b2453a5e130e9e61e9b5d65; from a4f17cc726712a52122ad38540bc3ff3a052d1a4 before da7c622cddd4fe36be69ca61e8c42e43cde94784; 5.13 (not affected: before 5.13; from 5.15.159 up to 5.15.*; from 6.1.91 up to 6.1.*; from 6.6.31 up to 6.6.*; from 6.8.10 up to 6.8.*; from 6.9 up to *)
- linux linux_kernel: from 5.13 before 5.15.159; from 5.16 before 6.1.91; from 6.2 before 6.6.31; from 6.7 before 6.8.10; 6.9

## References

- <https://git.kernel.org/stable/c/c9d48ce163305595ae20aee27774192476d5e6a5> (patch)
- <https://git.kernel.org/stable/c/10452edd175fcc4fd0f5ac782ed2a002e3e5d65c> (patch)
- <https://git.kernel.org/stable/c/84b38f48836662c4bfae646c014f4e981e16a2b2> (patch)
- <https://git.kernel.org/stable/c/06759ebaf75c19c87b2453a5e130e9e61e9b5d65> (patch)
- <https://git.kernel.org/stable/c/da7c622cddd4fe36be69ca61e8c42e43cde94784> (patch)

## Sources

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

---

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