CVE-2024-56669

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-56669
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-56669.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-56669
Downstream
Related
Published
2024-12-27T15:06:30Z
Modified
2025-10-17T19:07:05.048446Z
Severity
  • 7.8 (High) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
iommu/vt-d: Remove cache tags before disabling ATS
Details

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

iommu/vt-d: Remove cache tags before disabling ATS

The current implementation removes cache tags after disabling ATS, leading to potential memory leaks and kernel crashes. Specifically, CACHETAGDEVTLB type cache tags may still remain in the list even after the domain is freed, causing a use-after-free condition.

This issue really shows up when multiple VFs from different PFs passed through to a single user-space process via vfio-pci. In such cases, the kernel may crash with kernel messages like:

BUG: kernel NULL pointer dereference, address: 0000000000000014 PGD 19036a067 P4D 1940a3067 PUD 136c9b067 PMD 0 Oops: Oops: 0000 [#1] PREEMPT SMP NOPTI CPU: 74 UID: 0 PID: 3183 Comm: testCli Not tainted 6.11.9 #2 RIP: 0010:cachetagflushrange+0x9b/0x250 Call Trace: <TASK> ? _die+0x1f/0x60 ? pagefaultoops+0x163/0x590 ? excpagefault+0x72/0x190 ? asmexcpagefault+0x22/0x30 ? cachetagflushrange+0x9b/0x250 ? cachetagflushrange+0x5d/0x250 inteliommutlbsync+0x29/0x40 inteliommuunmappages+0xfe/0x160 _iommuunmap+0xd8/0x1a0 vfiounmapunpin+0x182/0x340 [vfioiommutype1] vfioremovedma+0x2a/0xb0 [vfioiommutype1] vfioiommutype1ioctl+0xafa/0x18e0 [vfioiommutype1]

Move cachetagunassigndomain() before iommudisablepcicaps() to fix it.

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
3b1d9e2b2d6856eabf5faa12d20c97fef657999f
Fixed
9a0a72d3ed919ebe6491f527630998be053151d8
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
3b1d9e2b2d6856eabf5faa12d20c97fef657999f
Fixed
1f2557e08a617a4b5e92a48a1a9a6f86621def18

Affected versions

v6.*

v6.10
v6.10-rc1
v6.10-rc2
v6.10-rc3
v6.10-rc4
v6.10-rc5
v6.10-rc6
v6.10-rc7
v6.11
v6.11-rc1
v6.11-rc2
v6.11-rc3
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
v6.9
v6.9-rc6
v6.9-rc7

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.10.0
Fixed
6.12.6