CVE-2024-56568
Severity CVSS v4.0:
Pending analysis
Type:
CWE-362
Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
Publication date:
27/12/2024
Last modified:
03/02/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
iommu/arm-smmu: Defer probe of clients after smmu device bound<br />
<br />
Null pointer dereference occurs due to a race between smmu<br />
driver probe and client driver probe, when of_dma_configure()<br />
for client is called after the iommu_device_register() for smmu driver<br />
probe has executed but before the driver_bound() for smmu driver<br />
has been called.<br />
<br />
Following is how the race occurs:<br />
<br />
T1:Smmu device probe T2: Client device probe<br />
<br />
really_probe()<br />
arm_smmu_device_probe()<br />
iommu_device_register()<br />
really_probe()<br />
platform_dma_configure()<br />
of_dma_configure()<br />
of_dma_configure_id()<br />
of_iommu_configure()<br />
iommu_probe_device()<br />
iommu_init_device()<br />
arm_smmu_probe_device()<br />
arm_smmu_get_by_fwnode()<br />
driver_find_device_by_fwnode()<br />
driver_find_device()<br />
next_device()<br />
klist_next()<br />
/* null ptr<br />
assigned to smmu */<br />
/* null ptr dereference<br />
while smmu->streamid_mask */<br />
driver_bound()<br />
klist_add_tail()<br />
<br />
When this null smmu pointer is dereferenced later in<br />
arm_smmu_probe_device, the device crashes.<br />
<br />
Fix this by deferring the probe of the client device<br />
until the smmu device has bound to the arm smmu driver.<br />
<br />
[will: Add comment]
Impact
Base Score 3.x
4.70
Severity 3.x
MEDIUM
Vulnerable products and versions
CPE | From | Up to |
---|---|---|
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.9 (including) | 5.10.231 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.11 (including) | 5.15.174 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.16 (including) | 6.1.120 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.2 (including) | 6.6.66 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7 (including) | 6.12.4 (excluding) |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/229e6ee43d2a160a1592b83aad620d6027084aad
- https://git.kernel.org/stable/c/4a9485918a042e3114890dfbe19839a1897f8b2c
- https://git.kernel.org/stable/c/5018696b19bc6c021e934a8a59f4b1dd8c0ac9f8
- https://git.kernel.org/stable/c/c2527d07c7e9cda2c6165d5edccf74752baac1b0
- https://git.kernel.org/stable/c/dc02407ea952e20c544a078a6be2e6f008327973
- https://git.kernel.org/stable/c/f8f794f387ad21c4696e5cd0626cb6f8a5f6aea5