CVE-2024-26988

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-26988
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-26988.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-26988
Downstream
Related
Published
2024-05-01T05:27:39.190Z
Modified
2025-11-26T19:33:49.453512Z
Summary
init/main.c: Fix potential static_command_line memory overflow
Details

In the Linux kernel, the following vulnerability has been resolved:

init/main.c: Fix potential staticcommandline memory overflow

We allocate memory of size 'xlen + strlen(bootcommandline) + 1' for staticcommandline, but the strings copied into staticcommandline are extracommandline and commandline, rather than extracommandline and bootcommand_line.

When strlen(commandline) > strlen(bootcommandline), staticcommand_line will overflow.

This patch just recovers strlen(commandline) which was miss-consolidated with strlen(bootcommandline) in the commit f5c7310ac73e ("init/main: add checks for the return value of memblockalloc*()")

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/blob/9c3874e559580d6c6ec8d449812ac11277724770/cves/2024/26xxx/CVE-2024-26988.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
f5c7310ac73ea270e3a1acdb73d1b4817f11fd67
Fixed
2ef607ea103616aec0289f1b65d103d499fa903a
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
f5c7310ac73ea270e3a1acdb73d1b4817f11fd67
Fixed
0dc727a4e05400205358a22c3d01ccad2c8e1fe4
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
f5c7310ac73ea270e3a1acdb73d1b4817f11fd67
Fixed
76c2f4d426a5358fced5d5990744d46f10a4ccea
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
f5c7310ac73ea270e3a1acdb73d1b4817f11fd67
Fixed
81cf85ae4f2dd5fa3e43021782aa72c4c85558e8
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
f5c7310ac73ea270e3a1acdb73d1b4817f11fd67
Fixed
936a02b5a9630c5beb0353c3085cc49d86c57034
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
f5c7310ac73ea270e3a1acdb73d1b4817f11fd67
Fixed
46dad3c1e57897ab9228332f03e1c14798d2d3b9

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.1.0
Fixed
5.10.216
Type
ECOSYSTEM
Events
Introduced
5.11.0
Fixed
5.15.157
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.1.88
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.29
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.8.8