В ядре Linux была устранена следующая уязвимость: drm/panthor: Add vm_bind область с перекрытием диапазона kbo check When a VM создана, вызывающему абоненту необходимо указать диапазон вырезки адресного пространства, отведенного для отображения BO ядра. Это означает, что vm_bind не должен пересекаться с этой областью, но на данный момент мы не проверяем это. Сначала я думал дать эти значения drm_gpuvm_init () через его аргументы reserve_offset, range, но оказалось, что это предназначено для диапазонов адресов VM, которые не управляются через обычную схему разделения / слияния drm_gpuvm, поэтому хранение конца диапазона пользователя VA во время создания VM и быстрая проверка в пути vm_bind ioctl была самой простой работой.
Новая проверка также гарантирует, что диапазон vm_bind не превышает размер 64-битного неподписанного целого числа. Это уже делалось дальше в стеке вызовов внутри drm_gpuvm_sm_map -> drm_gpuvm_range_valid, но лучше всего выйти из строя на ранней стадии драйвера до вызова функций GPUVM, чтобы мы не тратили время на выделение контекстных ресурсов vm_bind.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: drm/panthor: Add vm_bind region with kbo range overlap check When a VM is created, caller has to specify the range of the address space carve-out set aside for mapping kernel BO's. That means vm_bind mappings of UM-exposed BO's should not intersect with that region, but at the moment we're not checking this. At first, I thought of giving these values to drm_gpuvm_init() through its reserve_{offset, range} arguments, but it turns out that is meant for VM address spans that are not managed through the usual drm_gpuvm split/merge circuit, so storing the end of the user VA range at VM creation time and doing a quick check in the vm_bind ioctl path was the simplest workaround. The new check also makes sure vm_bind range doesn't overflow the size of a 64-bit unsigned integer. That was already being done further down the call stack inside drm_gpuvm_sm_map -> drm_gpuvm_range_valid, but it's best to fail early in the driver before GPUVM functions are invoked so that we won't waste time allocating vm_bind context resources.