Vulnerability · Published Dec 27, 2024 · Assigned by Linux

CVE-2024-56668iommu/vt-d: Fix qi_batch NULL pointer with nested parent domain

Medium 5.5

In plain English

A medium-severity null pointer dereference in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 8% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)5.5Medium
Exploit odds (30 days)0.2%top 91.8% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

In the Linux kernel, the following vulnerability has been resolved: iommu/vt-d: Fix qi_batch NULL pointer with nested parent domain The qi_batch is allocated when assigning cache tag for a domain. While for nested parent domain, it is missed. Hence, when trying to map pages to the nested parent, NULL dereference occurred. Also, there is potential memleak since there is no lock around domain->qi_batch allocation. To solve it, add a helper for qi_batch allocation, and call it in both the __cache_tag_assign_domain() and __cache_tag_assign_parent_domain(). BUG: kernel NULL pointer dereference, address: 0000000000000200 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 8104795067 P4D 0 Oops: Oops: 0000 [#1] PREEMPT SMP NOPTI CPU: 223 UID: 0 PID: 4357 Comm: qemu-system-x86 Not tainted 6.13.0-rc1-00028-g4b50c3c3b998-dirty #2632 Call Trace: ? __die+0x24/0x70 ? page_fault_oops+0x80/0x150 ? do_user_addr_fault+0x63/0x7b0 ? exc_page_fault+0x7c/0x220 ? asm_exc_page_fault+0x26/0x30 ? cache_tag_flush_range_np+0x13c/0x260 intel_iommu_iotlb_sync_map+0x1a/0x30 iommu_map+0x61/0xf0 batch_to_domain+0x188/0x250 iopt_area_fill_domains+0x125/0x320 ? rcu_is_watching+0x11/0x50 iopt_map_pages+0x63/0x100 iopt_map_common.isra.0+0xa7/0x190 iopt_map_user_pages+0x6a/0x80 iommufd_ioas_map+0xcd/0x1d0 iommufd_fops_ioctl+0x118/0x1c0 __x64_sys_ioctl+0x93/0xc0 do_syscall_64+0x71/0x140 entry_SYSCALL_64_after_hwframe+0x76/0x7e

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:13linux6.12.6-1DEBIAN-CVE-2024-56668
Debian:14linux6.12.6-1DEBIAN-CVE-2024-56668
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2024-56668
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2024-56668
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2024-56668
Ubuntu:22.04:LTSlinux-aws-6.5no fix listedUBUNTU-CVE-2024-56668
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2024-56668
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2024-56668
Ubuntu:22.04:LTSlinux-azure-6.5no fix listedUBUNTU-CVE-2024-56668
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2024-56668
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2024-56668
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2024-56668
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2024-56668
Ubuntu:22.04:LTSlinux-gcp-6.5no fix listedUBUNTU-CVE-2024-56668
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2024-56668
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2024-56668
Ubuntu:22.04:LTSlinux-hwe-6.5no fix listedUBUNTU-CVE-2024-56668
Ubuntu:22.04:LTSlinux-intel-iot-realtimeno fix listedUBUNTU-CVE-2024-56668
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2024-56668
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2024-56668
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.5no fix listedUBUNTU-CVE-2024-56668
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2024-56668
Ubuntu:22.04:LTSlinux-nvidia-6.5no fix listedUBUNTU-CVE-2024-56668
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2024-56668
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2024-56668
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2024-56668
Ubuntu:22.04:LTSlinux-oem-6.5no fix listedUBUNTU-CVE-2024-56668
Ubuntu:22.04:LTSlinux-oracle-6.5no fix listedUBUNTU-CVE-2024-56668
Ubuntu:24.04:LTSlinux-raspi-realtimeno fix listedUBUNTU-CVE-2024-56668
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2024-56668
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2024-56668
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2024-56668
Ubuntu:22.04:LTSlinux-riscv-6.5no fix listedUBUNTU-CVE-2024-56668
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2024-56668
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2024-56668
Ubuntu:22.04:LTSlinux-starfive-6.5no fix listedUBUNTU-CVE-2024-56668

Affected products (as reported)

VendorProductVersions
Linux Linux 705c1cdf1e73c4c727bbfc8775434e6dd36e8baf – before ffd774c34774fd4cc0e9cf2976595623a6c3a077705c1cdf1e73c4c727bbfc8775434e6dd36e8baf – before 74536f91962d5f6af0a42414773ce61e653c10ee
Linux Linux 6.12

Weakness: CWE-476 · Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

References