# CVE-2024-26988: init/main.c: Fix potential static_command_line memory overflow

- Severity: High 7.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/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.28%, higher than 22% of CVEs (2026-12-01)
- Published: 2024-05-01T05:27:39.190Z
- Modified: 2026-10-15T01:17:35.437Z
- Weaknesses: CWE-787
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- 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*()")

(As written by CVE List.)

## Affected

- Linux Linux: from 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.*; from 6.9 up to *)
- linux linux_kernel: from 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.9
- debian debian_linux: 10.0
- fedoraproject fedora: 38; 39; 40

## References

- <https://git.kernel.org/stable/c/2ef607ea103616aec0289f1b65d103d499fa903a> (patch)
- <https://git.kernel.org/stable/c/0dc727a4e05400205358a22c3d01ccad2c8e1fe4> (patch)
- <https://git.kernel.org/stable/c/76c2f4d426a5358fced5d5990744d46f10a4ccea> (patch)
- <https://git.kernel.org/stable/c/81cf85ae4f2dd5fa3e43021782aa72c4c85558e8> (patch)
- <https://git.kernel.org/stable/c/936a02b5a9630c5beb0353c3085cc49d86c57034> (patch)
- <https://git.kernel.org/stable/c/46dad3c1e57897ab9228332f03e1c14798d2d3b9> (patch)
- <https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html> (mailing-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

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

---

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