In the Linux kernel, the following vulnerability has been resolved:
spi: mchp-pci1xxx: Fix a possible null pointer dereference in pci1xxxspiprobe
In function pci1xxxxspiprobe, there is a potential null pointer that may be caused by a failed memory allocation by the function devm_kzalloc. Hence, a null pointer check needs to be added to prevent null pointer dereferencing later in the code.
To fix this issue, spibus->spiint[iter] should be checked. The memory allocated by devm_kzalloc will be automatically released, so just directly return -ENOMEM without worrying about memory leaks.
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/35xxx/CVE-2024-35883.json"
}[
{
"signature_type": "Function",
"deprecated": false,
"id": "CVE-2024-35883-35bde5d5",
"target": {
"file": "drivers/spi/spi-pci1xxxx.c",
"function": "pci1xxxx_spi_probe"
},
"digest": {
"length": 2985.0,
"function_hash": "211725272164178730282543087747349945502"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4b31a226097cf8cc3c9de5e855d97757fdb2bf06"
},
{
"signature_type": "Line",
"deprecated": false,
"id": "CVE-2024-35883-dd9dba32",
"target": {
"file": "drivers/spi/spi-pci1xxxx.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"308119984646425913715770066045635423759",
"76273038767711896095824632650828606554",
"279706289285096320680342353563951948838",
"277568885378955769828871120622664135412"
]
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4b31a226097cf8cc3c9de5e855d97757fdb2bf06"
}
]
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-35883.json"