accel/amdxdna: Fix locally exploitable BUG_ON in amdxdna_insert_pages()
No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in Kernel 13339132d89d00b513dff0730bff3a313b9b13b5, Kernel 4a19f7ab5972ef608b31ae921419bc3e04b3f8ad, Kernel 618fc8dc219c11b8b85f0c8e3f7ff46cc1544339 and 2 more.
In the Linux kernel, the following vulnerability has been resolved: accel/amdxdna: Fix locally exploitable BUG_ON in amdxdna_insert_pages() In amdxdna_insert_pages(), vm_flags_mod() sets VM_MIXEDMAP and clears VM_PFNMAP. If an unprivileged userspace process mmaps a non-imported GEM object and then calls madvise(MADV_DONTNEED), the PTEs will be successfully cleared because VM_MIXEDMAP allows this (unlike VM_PFNMAP). When userspace subsequently accesses the memory, drm_gem_shmem_fault() handles the page fault and attempts to map the backing shmem page via vmf_insert_pfn() which calls vmf_insert_pfn_prot(). Because the backing shmem page is normal system memory (pfn_valid(pfn) is true) and the VMA now has VM_MIXEDMAP set, won't this predictably trigger the explicit assertion BUG_ON((vma->vm_flags & VM_MIXEDMAP) && pfn_valid(pfn)) Fix by removing the vm_flags_mod() call and replacing the vm_insert_pages() pre-population with the handle_mm_fault() loop that was already used for the import (dma-buf) path.
Affected
Vendors, products and packages with version ranges
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| Linux | Kernel | =6.16, >=e486147c912f653ef4b60a6c7dbd4168a4c56a9f <13339132d89d00b513dff0730bff3a313b9b13b5, >=e486147c912f653ef4b60a6c7dbd4168a4c56a9f <4a19f7ab5972ef608b31ae921419bc3e04b3f8ad, >=e486147c912f653ef4b60a6c7dbd4168a4c56a9f <618fc8dc219c11b8b85f0c8e3f7ff46cc1544339 | 13339132d89d00b513dff0730bff3a313b9b13b5, 4a19f7ab5972ef608b31ae921419bc3e04b3f8ad, 618fc8dc219c11b8b85f0c8e3f7ff46cc1544339 |
| linux-kernel: Kernel | >=6.16.0 <6.18.57, >=6.19.0 <7.1.9 | 6.18.57, 7.1.9 |
Timeline
Every event on this vulnerability
Related
Other vulnerabilities in Kernel, strongest first
Embed
A live severity badge for an advisory, README or ticket