The issue is related to an off-by-one error in the CMA heap fault handler in the dma-buf: heaps component of the Linux kernel. This error allowed obtaining a mapping larger than the buffer size via mremap and bypassing the overflow check in dma buf mmap internal. When using such a mapping to attempt to fault past the end of the buffer, the CMA heap fault handler also checks the fault offset against the buffer size, but gets the boundary wrong by 1. The fix involves correcting the boundary check to prevent reading off the end of the pages array and inserting an arbitrary page in the mapping.