В ядре Linux устранена следующая уязвимость: drm/vc4: Drop резервирование BO вне job_lock vc4_queue_submit() вызывает drm_exec_fini() с удержанием job_lock и отключением прерываний. Помимо разблокировки оговорок, drm_exec_fini() освобождает массив объектов с помощью kvfree(), который запрашивает упреждаемый контекст задачи или прерывание без NMI, и может достигать might_sleep() через vfree(). Учитывая, что массив, который превышает страницу, может принять резервное копирование vmalloc, вызовите drm_exec_fini (), как только job_lock будет удален.
Бронирование затем проводится по всей вакансии, что безвредно, поскольку ничто на пути завершения не требует резервирования BO. Обратите внимание, что vc4_attach_fences () должен оставаться внутри критической секции, так как он ходит exec, который рабочий может освободить, как только job_lock будет отброшен.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: drm/vc4: Drop the BO reservations outside of job_lock vc4_queue_submit() calls drm_exec_fini() with job_lock held and interrupts disabled. Besides unlocking the reservations, drm_exec_fini() frees the object array with kvfree(), which asks for preemptible task context or a non-NMI interrupt, and may reach might_sleep() through vfree(). Considering that an array that exceeds a page can take the vmalloc fallback, call drm_exec_fini() once job_lock is dropped. The reservations are then held across the job kick, which is harmless as nothing in the completion path takes a BO reservation. Note that vc4_attach_fences() has to stay inside the critical section, as it walks exec, which the job done worker is free to release as soon as job_lock is dropped.