drm/amdkfd: Fix error path at svm_migrate_copy_to_ram
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 48ff079b28d82dbce000cc45c0fd35b6ae9ffbda · < 960c4a8069bfd352c48cc88592618f1ebe24c69e| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
drm/amdkfd: Fix error path at svm_migrate_copy_to_ram
If page migration from device to sys ram fails for some reasons driver needs release and unlock allocated system pages. To do that driver should use page physical address, or pfn, then get struct page*. Current driver uses dma address(for adev) that is not correct with IOMMU enabled, or even in general.
The patch releases and unlocks allocated system pages based on where migration failed by struct page* of sys ram pages. Also dma_unmap correspodent system ram pages at error path.
From the CVE record · Linux
The Linux kernel’s drm/amdkfd driver uses a DMA address instead of a page address when cleaning up after a failed migration from device memory to system RAM. This can cause incorrect handling of allocated system pages, particularly with IOMMU enabled. The input does not describe an attacker action, access requirement, or user interaction.
Engineers running Linux kernels with the drm/amdkfd driver should check their kernel version against the vendor advisory; affected versions are not specified.