7.8high
accel/amxdna: Fix page-insertion errors in amdxdna_insert_pages()
- Severity
- 7.8high CVSS:3.1 by Linux
- Exploit likelihood
- 0.13% (higher than 2% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- Linux
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from e486147c912f653ef4b60a6c7dbd4168a4c56a9f before b3d05a335cbd3d89538e9dde1621dccf33ae945a, from e486147c912f653ef4b60a6c7dbd4168a4c56a9f before 1501e4d07c6fee0d50531a0d1cb2be01a63e6e75, from e486147c912f653ef4b60a6c7dbd4168a4c56a9f before 8d51e0fd3e698919d2adeff71936377f0c0d4aa0, 6.16 Not affected: before 6.16, from 6.18.57 up to 6.18.*, from 7.1.9 up to 7.1.*, from 7.2 up to * | CVE List |
What each source says
CVE List
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.
NVD (es)
En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: accel/amxdna: Corrige errores de inserción de página en amdxdna_insert_pages() Dos rutas de error en amdxdna_insert_pages() llamaron a vma -> vm_ops -> close(vma) antes de devolver un código de error al llamador. Esto es incorrecto: amdxdna_gem_obj_mmap() registra un notificador de intervalo HMM antes de llamar a amdxdna_insert_pages(), y en un error grave salta a hmm_unreg para deshacer ese registro. Llamar a vm_ops -> close() manualmente - lo que reduce el pages_pin_count de shmem y la referencia al objeto GEM que respalda el VMA - antes de que la llamada al sistema mmap haya siquiera regresado hace que esos recursos sean liberados mientras el VMA aún está activo. La desestructuración del VMA del kernel llamará a vm_ops -> close() una segunda vez cuando el proceso desmapee el rango más tarde, produciendo un desbordamiento negativo del contador de referencias. Reemplaza ambas devoluciones de error grave con un enfoque de fallo diferido que mantiene el VMA activo y reintenta la inserción de página a través de la ruta de fallo de rango HMM.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-74721 changed 2026-10-15 | CVE Terms of Use |
| NVD | CVE-2026-74721 changed 2026-10-15 | Public domain |