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*()")
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/26xxx/CVE-2024-26988.json"
}"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-26988.json"
[
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2ef607ea103616aec0289f1b65d103d499fa903a",
"target": {
"file": "init/main.c"
},
"deprecated": false,
"id": "CVE-2024-26988-52a46729",
"digest": {
"threshold": 0.9,
"line_hashes": [
"134165154373422893428646853738334628083",
"7311478621643392883850913011629793823",
"106233825654800653449484651555485100806"
]
},
"signature_version": "v1",
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2ef607ea103616aec0289f1b65d103d499fa903a",
"target": {
"file": "init/main.c",
"function": "setup_command_line"
},
"deprecated": false,
"id": "CVE-2024-26988-a4d6b667",
"digest": {
"length": 1059.0,
"function_hash": "298170871291743098595205777475767638482"
},
"signature_version": "v1",
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@81cf85ae4f2dd5fa3e43021782aa72c4c85558e8",
"target": {
"file": "init/main.c"
},
"deprecated": false,
"id": "CVE-2024-26988-a70caeec",
"digest": {
"threshold": 0.9,
"line_hashes": [
"134165154373422893428646853738334628083",
"7311478621643392883850913011629793823",
"106233825654800653449484651555485100806"
]
},
"signature_version": "v1",
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@81cf85ae4f2dd5fa3e43021782aa72c4c85558e8",
"target": {
"file": "init/main.c",
"function": "setup_command_line"
},
"deprecated": false,
"id": "CVE-2024-26988-b028c0e9",
"digest": {
"length": 1262.0,
"function_hash": "148288149016477273280138933132441158108"
},
"signature_version": "v1",
"signature_type": "Function"
}
]