CVE-2026-99149: drm/amdgpu: fix GEM object leak on ENOMEM in userptr ioctl
From: Greg Kroah-Hartman <[email protected]>
Description
===========
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)
The Linux kernel CVE team has assigned CVE-2026-99149 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.19 with commit e095b55155ef69a8ae0eb114a7fd2a381c012f33 and fixed in 7.2.13 with commit 64a6d40156ae98caafc922c6d79fe202b0acd836 Issue introduced in 6.19 with commit e095b55155ef69a8ae0eb114a7fd2a381c012f33 and fixed in 7.3 with commit 3c516a5646285442e1cd71dff2584b77eb4fc421
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-99149
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/64a6d40156ae98caafc922c6d79fe202b0acd836 https://git.kernel.org/stable/c/3c516a5646285442e1cd71dff2584b77eb4fc421