# CVE-2024-26988: init/main.c: Fix potential static\_command\_line memory overflow

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.39% (percentile 25, 2026-11-28)
- **CWE:** CWE-787
- **Published:** 2024-05-01T05:27:39.190Z
- **Modified:** 2026-10-15T01:17:35.437Z

## Who should check

- Anyone running Linux \>= f5c7310ac73ea270e3a1acdb73d1b4817f11fd67, \< 2ef607ea103616aec0289f1b65d103d499fa903a; \>= f5c7310ac73ea270e3a1acdb73d1b4817f11fd67, \< 0dc727a4e05400205358a22c3d01ccad2c8e1fe4; \>= f5c7310ac73ea270e3a1acdb73d1b4817f11fd67, \< 76c2f4d426a5358fced5d5990744d46f10a4ccea; \>= f5c7310ac73ea270e3a1acdb73d1b4817f11fd67, \< 81cf85ae4f2dd5fa3e43021782aa72c4c85558e8; \>= f5c7310ac73ea270e3a1acdb73d1b4817f11fd67, \< 936a02b5a9630c5beb0353c3085cc49d86c57034; \>= f5c7310ac73ea270e3a1acdb73d1b4817f11fd67, \< 46dad3c1e57897ab9228332f03e1c14798d2d3b9
- Anyone running Linux 5.1

## 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 and fixed versions

- Linux: \>= f5c7310ac73ea270e3a1acdb73d1b4817f11fd67, \< 2ef607ea103616aec0289f1b65d103d499fa903a; \>= f5c7310ac73ea270e3a1acdb73d1b4817f11fd67, \< 0dc727a4e05400205358a22c3d01ccad2c8e1fe4; \>= f5c7310ac73ea270e3a1acdb73d1b4817f11fd67, \< 76c2f4d426a5358fced5d5990744d46f10a4ccea; \>= f5c7310ac73ea270e3a1acdb73d1b4817f11fd67, \< 81cf85ae4f2dd5fa3e43021782aa72c4c85558e8; \>= f5c7310ac73ea270e3a1acdb73d1b4817f11fd67, \< 936a02b5a9630c5beb0353c3085cc49d86c57034; \>= f5c7310ac73ea270e3a1acdb73d1b4817f11fd67, \< 46dad3c1e57897ab9228332f03e1c14798d2d3b9 (cvelist)
- Linux: 5.1 (cvelist)

## Mitigation

- Upgrade Linux to 46dad3c1e57897ab9228332f03e1c14798d2d3b9 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-26988. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-26988.md
Affected: Linux >= f5c7310ac73ea270e3a1acdb73d1b4817f11fd67, < 2ef607ea103616aec0289f1b65d103d499fa903a; >= f5c7310ac73ea270e3a1acdb73d1b4817f11fd67, < 0dc727a4e05400205358a22c3d01ccad2c8e1fe4; >= f5c7310ac73ea270e3a1acdb73d1b4817f11fd67, < 76c2f4d426a5358fced5d5990744d46f10a4ccea; >= f5c7310ac73ea270e3a1acd…
Fixed in: Linux 2ef607ea103616aec0289f1b65d103d499fa903a, Linux 0dc727a4e05400205358a22c3d01ccad2c8e1fe4, Linux 76c2f4d426a5358fced5d5990744d46f10a4ccea, Linux 81cf85ae4f2dd5fa3e43021782aa72c4c85558e8, Linux 936a02b5a9630c5beb0353c3085cc49d86c57034, Linux 46dad3c1e57897ab9228332f03e1c14798d2d3b9

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-26988 being exploited?

There is no confirmed exploitation: CVE-2024-26988 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.39% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2024-26988?

High: CVSS 7.8 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-26988?

Linux \>= f5c7310ac73ea270e3a1acdb73d1b4817f11fd67, \< 2ef607ea103616aec0289f1b65d103d499fa903a; \>= f5c7310ac73ea270e3a1acdb73d1b4817f11fd67, \< 0dc727a4e05400205358a22c3d01ccad2c8e1fe4; \>= f5c7310ac73ea270e3a1acdb73d1b4817f11fd67, \< 76c2f4d426a5358fced5d5990744d46f10a4ccea; \>= f5c7310ac73ea270e3a1acdb73d1b4817f11fd67, \< 81cf85ae4f2dd5fa3e43021782aa72c4c85558e8; \>= f5c7310ac73ea270e3a1acdb73d1b4817f11fd67, \< 936a02b5a9630c5beb0353c3085cc49d86c57034; \>= f5c7310ac73ea270e3a1acdb73d1b4817f11fd67, \< 46dad3c1e57897ab9228332f03e1c14798d2d3b9; Linux 5.1.

### Is there a fix for CVE-2024-26988?

Yes. Fixed in Linux 2ef607ea103616aec0289f1b65d103d499fa903a, Linux 0dc727a4e05400205358a22c3d01ccad2c8e1fe4, Linux 76c2f4d426a5358fced5d5990744d46f10a4ccea, Linux 81cf85ae4f2dd5fa3e43021782aa72c4c85558e8, Linux 936a02b5a9630c5beb0353c3085cc49d86c57034, Linux 46dad3c1e57897ab9228332f03e1c14798d2d3b9. Upgrade Linux to 46dad3c1e57897ab9228332f03e1c14798d2d3b9 or later.

### How do I check if I'm affected by CVE-2024-26988?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <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>
- other: <https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/DAMSOZXJEPUOXW33WZYWCVAY7Z5S7OOY/>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4EZ6PJW7VOZ224TD7N4JZNU6KV32ZJ53/>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/GCBZZEC7L7KTWWAS2NLJK6SO3IZIL4WW/>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-265688.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-613116.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-26988>

HTML: <https://flawdb.com/CVE-2024-26988> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-26988>
