CVE-2026-74721: accel/amxdna: Fix page-insertion errors in amdxdna_insert_pages()

Greg Kroah-Hartman <[email protected]>
Newsgroups org.kernel.vger.linux-cve-announce
Message-ID <2026082240-CVE-2026-74721-18a0@gregkh>
From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

accel/amxdna: Fix page-insertion errors in amdxdna_insert_pages()

Two error paths in amdxdna_insert_pages() called vma->vm_ops->close(vma)
before returning an error code to the caller.  This is incorrect:
amdxdna_gem_obj_mmap() registers an HMM interval notifier before calling
amdxdna_insert_pages(), and on a hard error it jumps to hmm_unreg to undo
that registration.  Calling vm_ops->close() manually — which drops the
shmem pages_pin_count and the GEM object reference that backs the VMA —
before the mmap syscall has even returned causes those resources to be
released while the VMA is still alive.  The kernel VMA teardown will call
vm_ops->close() a second time when the process later unmaps the range,
producing a reference count underflow.

Replace both hard-error returns with a deferred-fault approach that keeps
the VMA alive and retries page insertion through the HMM range-fault path.

The Linux kernel CVE team has assigned CVE-2026-74721 to this issue.


Affected and fixed versions
===========================

	Issue introduced in 6.16 with commit e486147c912f653ef4b60a6c7dbd4168a4c56a9f and fixed in 7.1.9 with commit 1501e4d07c6fee0d50531a0d1cb2be01a63e6e75
	Issue introduced in 6.16 with commit e486147c912f653ef4b60a6c7dbd4168a4c56a9f and fixed in 7.2 with commit 8d51e0fd3e698919d2adeff71936377f0c0d4aa0

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-74721
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/accel/amdxdna/amdxdna_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/1501e4d07c6fee0d50531a0d1cb2be01a63e6e75
	https://git.kernel.org/stable/c/8d51e0fd3e698919d2adeff71936377f0c0d4aa0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.