CVE-2024-36931
JSON

7.1high

s390/cio: Ensure the copied buf is NUL terminated

Severity
7.1high CVSS:3.1 by NVD
Exploit likelihood
0.23% (higher than 15% of CVEs; EPSS, by FIRST)
Published
Last changed
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.

Affected

Product or packageVersionsReported by
Linux Linuxfrom 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 *
CVE List
linux linux_kernelfrom 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.9NVD

Classification

CWE-125

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

NVD (es)

En el kernel de Linux, se resolvió la siguiente vulnerabilidad: s390/cio: asegúrese de que el buf copiado tenga terminación NUL. Actualmente, asignamos un búfer del kernel del tamaño de lbuf y copiamos lbuf del espacio de usuario a ese búfer. Más adelante, usamos scanf en este búfer pero no nos aseguramos de que la cadena termine dentro del búfer, esto puede provocar una lectura OOB cuando usamos scanf. Solucione este problema utilizando memdup_user_nul en su lugar.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-36931 changed 2026-05-11CVE Terms of Use
NVDCVE-2024-36931 changed 2026-06-17Public domain