CVE-2024-26988 init/main.c: Fix potential static_command_line memory overflow
A memory overflow in the Linux kernel init process can lead to system crashes or potential code execution due to incorrect buffer size calculation.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-26988?
CVE-2024-26988 is a high-severity memory corruption vulnerability in Debian Debian Linux, published on 1 May 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Official 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*()")
Weakness: CWE-787
Which versions are affected by CVE-2024-26988?
It affects 3 products.
Products include Debian Debian Linux, Fedoraproject Fedora, Linux kernel.
How do I fix CVE-2024-26988?
Apply the vendor's patch.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2024-26988 being exploited?
There is no known exploitation of CVE-2024-26988 in the wild and no public exploit code.
Other vulnerabilities in Debian Debian Linux
Sources
Also known as BELL-CVE-2024-26988, DEBIAN-CVE-2024-26988, GHSA-h5cg-5c4w-8jch, UBUNTU-CVE-2024-26988.