CVE-2024-24862
Assigner: Anolis
Published: 2024-04-14T11:47:15.737Z
State: PUBLISHED
affected: defaultStatus: unaffected
modules: spi
packageName: kernel
platforms: Linux
product: Linux kernel
programFiles: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/spi/spi-pci1xxxx.c?h=v6.9-rc3
repo: https://git.kernel.org/
vendor: Linux
versions: lessThan: v6.9-rc3
status: affected
version: v6.2
versionType: custom
credits: type: reporter
value: 刘怀远 <qq810974084@gmail.com>
type: finder
value: 白家驹 <baijiaju@buaa.edu.cn>
descriptions: supportingMedia: base64: no
type: text/html
value: <span style="background-color: rgb(255, 255, 255);">In function pci1xxxx_spi_probe, 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.
<br>
To fix this issue, spi_bus-&gt;spi_int[iter] should be checked. The memory
allocated by devm_kzalloc will be automatically released, so just directly
return -ENOMEM without worrying about memory leaks.
</span><br><br>
value: In function pci1xxxx_spi_probe, 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, spi_bus->spi_int[iter] should be checked. The memory
allocated by devm_kzalloc will be automatically released, so just directly
return -ENOMEM without worrying about memory leaks.


impacts: capecId: CAPEC-129
descriptions: value: CAPEC-129 Pointer Manipulation
metrics: cvssV3_1: attackComplexity: HIGH
attackVector: LOCAL
availabilityImpact: HIGH
baseScore: 5.3
baseSeverity: MEDIUM
confidentialityImpact: NONE
integrityImpact: NONE
privilegesRequired: LOW
scope: CHANGED
userInteraction: REQUIRED
vectorString: CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:N/I:N/A:H
version: 3.1
format: CVSS
scenarios: value: General
problemTypes: descriptions: cweId: CWE-476
description: CWE-476 NULL Pointer Dereference
type: CWE
solutions: supportingMedia: base64: no
type: text/html
value: <a target="_blank" rel="nofollow" href="https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20240411&amp;id=1f886a7bfb3faf4c1021e73f045538008ce7634e">https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20240411&amp;id=1...</a><br>
value:  https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20240411&id=1... https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/ 

source: discovery: UNKNOWN
title: NULL-pointer dereference in Linux kernel spi driver in function pci1xxxx_spi_probe
x_generator: engine: Vulnogram 0.1.0-dev