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.
[
{
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4b31a226097cf8cc3c9de5e855d97757fdb2bf06",
"signature_type": "Function",
"digest": {
"function_hash": "211725272164178730282543087747349945502",
"length": 2985.0
},
"target": {
"file": "drivers/spi/spi-pci1xxxx.c",
"function": "pci1xxxx_spi_probe"
},
"id": "CVE-2024-35883-35bde5d5"
},
{
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1f886a7bfb3faf4c1021e73f045538008ce7634e",
"signature_type": "Function",
"digest": {
"function_hash": "70800791552645455022427733374651909137",
"length": 3110.0
},
"target": {
"file": "drivers/spi/spi-pci1xxxx.c",
"function": "pci1xxxx_spi_probe"
},
"id": "CVE-2024-35883-4ef4be77"
},
{
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@95e5d9eb26705a9a76d2ef8bcba9ee2e195d653d",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"308119984646425913715770066045635423759",
"76273038767711896095824632650828606554",
"279706289285096320680342353563951948838",
"277568885378955769828871120622664135412"
]
},
"target": {
"file": "drivers/spi/spi-pci1xxxx.c"
},
"id": "CVE-2024-35883-7f3c84f9"
},
{
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1f886a7bfb3faf4c1021e73f045538008ce7634e",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"308119984646425913715770066045635423759",
"76273038767711896095824632650828606554",
"279706289285096320680342353563951948838",
"277568885378955769828871120622664135412"
]
},
"target": {
"file": "drivers/spi/spi-pci1xxxx.c"
},
"id": "CVE-2024-35883-a071c735"
},
{
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4b31a226097cf8cc3c9de5e855d97757fdb2bf06",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"308119984646425913715770066045635423759",
"76273038767711896095824632650828606554",
"279706289285096320680342353563951948838",
"277568885378955769828871120622664135412"
]
},
"target": {
"file": "drivers/spi/spi-pci1xxxx.c"
},
"id": "CVE-2024-35883-dd9dba32"
},
{
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@95e5d9eb26705a9a76d2ef8bcba9ee2e195d653d",
"signature_type": "Function",
"digest": {
"function_hash": "211725272164178730282543087747349945502",
"length": 2985.0
},
"target": {
"file": "drivers/spi/spi-pci1xxxx.c",
"function": "pci1xxxx_spi_probe"
},
"id": "CVE-2024-35883-e3a4445d"
}
]