CVE-2024-36925

Severity CVSS v4.0:
Pending analysis
Type:
CWE-476 NULL Pointer Dereference
Publication date:
30/05/2024
Last modified:
10/06/2024

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> swiotlb: initialise restricted pool list_head when SWIOTLB_DYNAMIC=y<br /> <br /> Using restricted DMA pools (CONFIG_DMA_RESTRICTED_POOL=y) in conjunction<br /> with dynamic SWIOTLB (CONFIG_SWIOTLB_DYNAMIC=y) leads to the following<br /> crash when initialising the restricted pools at boot-time:<br /> <br /> | Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008<br /> | Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP<br /> | pc : rmem_swiotlb_device_init+0xfc/0x1ec<br /> | lr : rmem_swiotlb_device_init+0xf0/0x1ec<br /> | Call trace:<br /> | rmem_swiotlb_device_init+0xfc/0x1ec<br /> | of_reserved_mem_device_init_by_idx+0x18c/0x238<br /> | of_dma_configure_id+0x31c/0x33c<br /> | platform_dma_configure+0x34/0x80<br /> <br /> faddr2line reveals that the crash is in the list validation code:<br /> <br /> include/linux/list.h:83<br /> include/linux/rculist.h:79<br /> include/linux/rculist.h:106<br /> kernel/dma/swiotlb.c:306<br /> kernel/dma/swiotlb.c:1695<br /> <br /> because add_mem_pool() is trying to list_add_rcu() to a NULL<br /> &amp;#39;mem-&gt;pools&amp;#39;.<br /> <br /> Fix the crash by initialising the &amp;#39;mem-&gt;pools&amp;#39; list_head in<br /> rmem_swiotlb_device_init() before calling add_mem_pool().

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.6 (including) 6.6.31 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.7 (including) 6.8.10 (excluding)