Description
In the Linux kernel, the following vulnerability has been resolved: drm/amdkfd: Fix the case that vm range is hole at svm_migrate_copy_to_vram When migration vm range is hole at cpu side(MIGRATE_PFN_MIGRATE set + MIGRATE_PFN_VALID unset) driver still allocates device pages. There is no dma map of src pages and migration. j is 0 and svm_migrate_copy_memory_gart() will return an uninitialized r. That can trigger out_free_vram_pages to drop all VRAM just set up. Initialize r and only call the last svm_migrate_copy_memory_gart if j > 0. Current code postponed the last page to the final copy. This patch flushes on the last page when reach to the end of current drm_buddy_block; avoids another svm_migrate_copy_memory_gart.
Affected products
Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.
Linux Linux
Default version status: unaffected
50ea50cf6f6d31d3235ad1853c5dbea766a3ed11 to < 6e1a6f3ddb87d7f89a775c55fb399680c02bdcc2affected50ea50cf6f6d31d3235ad1853c5dbea766a3ed11 to < bd1adb2e5101db649121b59e601c92773a302a70affected50ea50cf6f6d31d3235ad1853c5dbea766a3ed11 to < ae806a95b28fcecb913430cfa45a252e91a945d6affected50ea50cf6f6d31d3235ad1853c5dbea766a3ed11 to < 0a9a0e8a97da70a0336c9115178aaf1be29bcfb1affected50ea50cf6f6d31d3235ad1853c5dbea766a3ed11 to < 520e345ffe05aabef1db82beda4288afb1757ff2affected
Linux Linux
Default version status: affected
5.14affected0 to < 5.14unaffected6.6.160 to ≤ 6.6.*unaffected6.12.114 to ≤ 6.12.*unaffected6.18.51 to ≤ 6.18.*unaffected7.2.5 to ≤ 7.2.*unaffected7.3 to ≤ *unaffected
References
- https://git.kernel.org/stable/c/6e1a6f3ddb87d7f89a775c55fb399680c02bdcc2 ↗
- https://git.kernel.org/stable/c/bd1adb2e5101db649121b59e601c92773a302a70 ↗
- https://git.kernel.org/stable/c/ae806a95b28fcecb913430cfa45a252e91a945d6 ↗
- https://git.kernel.org/stable/c/0a9a0e8a97da70a0336c9115178aaf1be29bcfb1 ↗
- https://git.kernel.org/stable/c/520e345ffe05aabef1db82beda4288afb1757ff2 ↗