Linux kernel
cpe:2.3:a:linux:linux_kernel:*:*:*:*:*:*:*, +4 more
A vulnerability in the Linux kernel's VFIO Type1 IOMMU implementation can lead to a memory management issue. When a VFIO container is maintained across an exec call, it receives a new memory management structure (mm) with the locked_vm counter reset to zero. This change causes the container to lose track of existing DMA (Direct Memory Access) mappings. If the user then unmaps a DMA mapping, the locked_vm counter can underflow, resulting in a large unsigned value. This underflow causes subsequent DMA map requests to fail with an 'out of memory' error in the __account_locked_vm function.
Exploitation of this vulnerability can cause a denial of service by disrupting normal DMA mapping operations, leading to memory management errors.
To reproduce this vulnerability, create a VFIO container and preserve it across an exec call. This can be done by using a process that manages VFIO devices, such as QEMU, and executing a command that preserves the process state while the VFIO container is active. After the exec call, the container will have a new memory management structure with the locked_vm counter reset to zero. If the user then unmaps a DMA mapping, the locked_vm counter will underflow, causing subsequent DMA map requests to fail with an 'out of memory' error.
The vulnerability has been addressed in Linux kernel commits 046eca5018f8a5dd1dc2cedf87fb5843b9ea3026, 5a271242716846cc016736fb76be2b40ee49b0c3, a6b2aabe664098d5cf877ae0fd96459464a30e17, b0790dff0760b7734cf0961f497ad64628ca550b and eafb81c50da899dd80b340c841277acc4a1945b7.
Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.