accel/qaic: Add overflow check to remap_pfn_range during mmap
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
accel/qaic: Add overflow check to remap_pfn_range during mmap
The call to remap_pfn_range in qaic_gem_object_mmap is susceptible to (re)mapping beyond the VMA if the BO is too large. This can cause use after free issues when munmap() unmaps only the VMA region and not the additional mappings. To prevent this, check the remaining size of the VMA before remapping and truncate the remapped length if sg->length is too large.
[jhugo: fix braces from checkpatch --strict]
From the CVE record · Linux
The Linux kernel’s qaic_gem_object_mmap can map beyond the virtual memory area when a buffer object is too large. A local caller using mmap may trigger a use-after-free when munmap removes only the original area, leaving the additional mappings.
Teams running Linux kernels with the accel/qaic driver should check whether their kernel includes the fix; affected versions were not specified.