CVE-2024-56668

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-56668
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-56668.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-56668
Downstream
Published
2024-12-27T15:06:29Z
Modified
2025-10-15T02:00:18.853214Z
Severity
  • 5.5 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
iommu/vt-d: Fix qi_batch NULL pointer with nested parent domain
Details

In the Linux kernel, the following vulnerability has been resolved:

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

The qibatch 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->qibatch allocation.

To solve it, add a helper for qibatch allocation, and call it in both the _cachetagassigndomain() and _cachetagassignparentdomain().

BUG: kernel NULL pointer dereference, address: 0000000000000200 #PF: supervisor read access in kernel mode #PF: errorcode(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 ? pagefaultoops+0x80/0x150 ? douseraddrfault+0x63/0x7b0 ? excpagefault+0x7c/0x220 ? asmexcpagefault+0x26/0x30 ? cachetagflushrangenp+0x13c/0x260 inteliommuiotlbsyncmap+0x1a/0x30 iommumap+0x61/0xf0 batchtodomain+0x188/0x250 ioptareafilldomains+0x125/0x320 ? rcuiswatching+0x11/0x50 ioptmappages+0x63/0x100 ioptmapcommon.isra.0+0xa7/0x190 ioptmapuserpages+0x6a/0x80 iommufdioasmap+0xcd/0x1d0 iommufdfopsioctl+0x118/0x1c0 _x64sysioctl+0x93/0xc0 dosyscall64+0x71/0x140 entrySYSCALL64afterhwframe+0x76/0x7e

References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
705c1cdf1e73c4c727bbfc8775434e6dd36e8baf
Fixed
ffd774c34774fd4cc0e9cf2976595623a6c3a077
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
705c1cdf1e73c4c727bbfc8775434e6dd36e8baf
Fixed
74536f91962d5f6af0a42414773ce61e653c10ee

Affected versions

v6.*

v6.11
v6.11-rc4
v6.11-rc5
v6.11-rc6
v6.11-rc7
v6.12
v6.12-rc1
v6.12-rc2
v6.12-rc3
v6.12-rc4
v6.12-rc5
v6.12-rc6
v6.12-rc7
v6.12.1
v6.12.2
v6.12.3
v6.12.4
v6.12.5
v6.13-rc1
v6.13-rc2

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.12.0
Fixed
6.12.6