CVE-2024-26988
JSON

7.8high

init/main.c: Fix potential static_command_line memory overflow

Severity
7.8high CVSS:3.1 by NVD
Exploit likelihood
0.28% (higher than 22% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

Description

In the Linux kernel, the following vulnerability has been resolved: init/main.c: Fix potential static_command_line memory overflow We allocate memory of size 'xlen + strlen(boot_command_line) + 1' for static_command_line, but the strings copied into static_command_line are extra_command_line and command_line, rather than extra_command_line and boot_command_line. When strlen(command_line) > strlen(boot_command_line), static_command_line will overflow. This patch just recovers strlen(command_line) which was miss-consolidated with strlen(boot_command_line) in the commit f5c7310ac73e ("init/main: add checks for the return value of memblock_alloc*()")

Affected

Product or packageVersionsReported by
Linux Linuxfrom f5c7310ac73ea270e3a1acdb73d1b4817f11fd67 before 2ef607ea103616aec0289f1b65d103d499fa903a, from f5c7310ac73ea270e3a1acdb73d1b4817f11fd67 before 0dc727a4e05400205358a22c3d01ccad2c8e1fe4, from f5c7310ac73ea270e3a1acdb73d1b4817f11fd67 before 76c2f4d426a5358fced5d5990744d46f10a4ccea, from f5c7310ac73ea270e3a1acdb73d1b4817f11fd67 before 81cf85ae4f2dd5fa3e43021782aa72c4c85558e8, from f5c7310ac73ea270e3a1acdb73d1b4817f11fd67 before 936a02b5a9630c5beb0353c3085cc49d86c57034, from f5c7310ac73ea270e3a1acdb73d1b4817f11fd67 before 46dad3c1e57897ab9228332f03e1c14798d2d3b9, 5.1
Not affected: before 5.1, from 5.10.216 up to 5.10.*, from 5.15.157 up to 5.15.*, from 6.1.88 up to 6.1.*, from 6.6.29 up to 6.6.*, from 6.8.8 up to 6.8.*
CVE List
linux linux_kernelfrom 5.1 before 5.10.216, from 5.11 before 5.15.157, from 5.16 before 6.1.88, from 6.2 before 6.6.29, from 6.7 before 6.8.8, 6.9NVD
debian debian_linux10.0NVD
fedoraproject fedora38, 39, 40NVD

Classification

CWE-787

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: init/main.c: Fix potential static_command_line memory overflow We allocate memory of size 'xlen + strlen(boot_command_line) + 1' for static_command_line, but the strings copied into static_command_line are extra_command_line and command_line, rather than extra_command_line and boot_command_line. When strlen(command_line) > strlen(boot_command_line), static_command_line will overflow. This patch just recovers strlen(command_line) which was miss-consolidated with strlen(boot_command_line) in the commit f5c7310ac73e ("init/main: add checks for the return value of memblock_alloc*()")

NVD (es)

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: init/main.c: soluciona un posible desbordamiento de memoria de static_command_line Asignamos memoria de tamaño 'xlen + strlen(boot_command_line) + 1' para static_command_line, pero las cadenas copiadas en static_command_line son extra_command_line y command_line, en lugar de extra_command_line y boot_command_line. Cuando strlen(command_line) > strlen(boot_command_line), static_command_line se desbordará. Este parche simplemente recupera strlen(command_line) que no se consolidó con strlen(boot_command_line) en el commit f5c7310ac73e ("init/main: agregue comprobaciones para el valor de retorno de memblock_alloc*()")

References

https://git.kernel.org/stable/c/2ef607ea103616aec0289f1b65d103d499fa903apatch
https://git.kernel.org/stable/c/0dc727a4e05400205358a22c3d01ccad2c8e1fe4patch
https://git.kernel.org/stable/c/76c2f4d426a5358fced5d5990744d46f10a4cceapatch
https://git.kernel.org/stable/c/81cf85ae4f2dd5fa3e43021782aa72c4c85558e8patch
https://git.kernel.org/stable/c/936a02b5a9630c5beb0353c3085cc49d86c57034patch
https://git.kernel.org/stable/c/46dad3c1e57897ab9228332f03e1c14798d2d3b9patch
https://lists.debian.org/debian-lts-announce/2024/06/msg00017.htmlmailing-list, third-party-advisory
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/DAMSOZXJEPUOXW33WZYWCVAY7Z5S7OOY/mailing-list, third-party-advisory
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4EZ6PJW7VOZ224TD7N4JZNU6KV32ZJ53/mailing-list, third-party-advisory
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/GCBZZEC7L7KTWWAS2NLJK6SO3IZIL4WW/mailing-list, third-party-advisory
https://cert-portal.siemens.com/productcert/html/ssa-265688.html
https://cert-portal.siemens.com/productcert/html/ssa-613116.html

Sources

SourceRecordLicence
CVE ListCVE-2024-26988 changed 2026-10-15CVE Terms of Use
NVDCVE-2024-26988 changed 2026-10-15Public domain