В ядре Linux устранена следующая уязвимость: drm/amdgpu: исправить утечку объекта GEM на ENOMEM в userptr ioctl When amdgpu_hmm_range_alloc() не удается amdgpu_gem_userptr_ioctl() возвращается -ENOMEM сразу и пропускает очистку всех остальных путей ошибки. Объект GEM, ссылка bo->parent на корень VM и регистрация уведомителя MMU остались позади. Используйте release_object здесь, а не user_pages_done, диапазон по-прежнему NULL на данный момент. (Вишня выбрана из commit bbe739e407a542073ec1a7872b14843566b4919e)
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: drm/amdgpu: fix GEM object leak on ENOMEM in userptr ioctl When amdgpu_hmm_range_alloc() fails amdgpu_gem_userptr_ioctl() returns -ENOMEM right away and skips the cleanup every other error path goes through. The GEM object, the bo->parent reference on the VM root and the MMU notifier registration are all left behind. Use release_object here, not user_pages_done, range is still NULL at this point. (cherry picked from commit bbe739e407a542073ec1a7872b14843566b4919e)