CVE-2024-56669

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, CACHE_TAG_DEVTLB 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:cache_tag_flush_range+0x9b/0x250 Call Trace: <TASK> ? __die+0x1f/0x60 ? page_fault_oops+0x163/0x590 ? exc_page_fault+0x72/0x190 ? asm_exc_page_fault+0x22/0x30 ? cache_tag_flush_range+0x9b/0x250 ? cache_tag_flush_range+0x5d/0x250 intel_iommu_tlb_sync+0x29/0x40 intel_iommu_unmap_pages+0xfe/0x160 __iommu_unmap+0xd8/0x1a0 vfio_unmap_unpin+0x182/0x340 [vfio_iommu_type1] vfio_remove_dma+0x2a/0xb0 [vfio_iommu_type1] vfio_iommu_type1_ioctl+0xafa/0x18e0 [vfio_iommu_type1] Move cache_tag_unassign_domain() before iommu_disable_pci_caps() to fix it.
Configurations

Configuration 1 (hide)

OR cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc2:*:*:*:*:*:*

History

06 Jan 2025, 18:19

Type Values Removed Values Added
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 7.8
First Time Linux
Linux linux Kernel
Summary
  • (es) En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: iommu/vt-d: eliminar etiquetas de caché antes de deshabilitar ATS La implementación actual elimina las etiquetas de caché después de deshabilitar ATS, lo que genera posibles fugas de memoria y fallas del kernel. Específicamente, las etiquetas de caché de tipo CACHE_TAG_DEVTLB pueden permanecer en la lista incluso después de que se libere el dominio, lo que provoca una condición de use-after-free. Este problema realmente aparece cuando múltiples VF de diferentes PF pasan a un solo proceso de espacio de usuario a través de vfio-pci. En tales casos, el núcleo puede bloquearse con mensajes como: ERROR: desreferencia de puntero NULL del núcleo, dirección: 0000000000000014 PGD 19036a067 P4D 1940a3067 PUD 136c9b067 PMD 0 Oops: Oops: 0000 [#1] PREEMPT SMP NOPTI CPU: 74 UID: 0 PID: 3183 Comm: testCli No contaminado 6.11.9 #2 RIP: 0010:cache_tag_flush_range+0x9b/0x250 Rastreo de llamadas: ? __die+0x1f/0x60 ? page_fault_oops+0x163/0x590 ? exc_page_fault+0x72/0x190 ? asm_exc_page_fault+0x22/0x30 ? rango_de_desinfección_de_etiquetas_de_caché+0x9b/0x250 ? cache_tag_flush_range+0x5d/0x250 intel_iommu_tlb_sync+0x29/0x40 intel_iommu_unmap_pages+0xfe/0x160 __iommu_unmap+0xd8/0x1a0 vfio_unmap_unpin+0x182/0x340 [vfio_iommu_type1] vfio_remove_dma+0x2a/0xb0 [vfio_iommu_type1] vfio_iommu_type1_ioctl+0xafa/0x18e0 [vfio_iommu_type1] Mueva cache_tag_unassign_domain() antes de iommu_disable_pci_caps() para solucionarlo.
CPE cpe:2.3:o:linux:linux_kernel:6.13:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc1:*:*:*:*:*:*
CWE CWE-401
CWE-416
CWE-476
References () https://git.kernel.org/stable/c/1f2557e08a617a4b5e92a48a1a9a6f86621def18 - () https://git.kernel.org/stable/c/1f2557e08a617a4b5e92a48a1a9a6f86621def18 - Patch
References () https://git.kernel.org/stable/c/9a0a72d3ed919ebe6491f527630998be053151d8 - () https://git.kernel.org/stable/c/9a0a72d3ed919ebe6491f527630998be053151d8 - Patch

27 Dec 2024, 15:15

Type Values Removed Values Added
New CVE

Information

Published : 2024-12-27 15:15

Updated : 2025-02-11 16:15


NVD link : CVE-2024-56669

Mitre link : CVE-2024-56669

CVE.ORG link : CVE-2024-56669


JSON object : View

Products Affected

linux

  • linux_kernel
CWE
CWE-401

Missing Release of Memory after Effective Lifetime

CWE-416

Use After Free

CWE-476

NULL Pointer Dereference