Linux kernel resource leak in amdgpu userptr ioctl error handling
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
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)
From the CVE record · Linux
The Linux kernel's amdgpu userptr ioctl leaks a GEM object, a VM-root reference and an MMU notifier registration if memory allocation fails. A local caller invoking the ioctl could trigger the leak under that condition; the input does not specify authentication requirements or user interaction beyond the call.
Engineers running Linux kernels with the amdgpu driver should check whether their kernel includes the fix; affected versions are not specified.