Skip to contentSkip to conversation

CVE-2026-89804: drm/nouveau/dmem: fix mismatched DMA unmap size for large folios

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 16

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

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

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

drm/nouveau/dmem: fix mismatched DMA unmap size for large folios

Device-private THP migration maps migration buffers with page_size() and records that length in dma_info->size. For a compound folio page_size() is PAGE_SIZE << order, but two teardown sites still pass a literal PAGE_SIZE to dma_unmap_page():

- nouveau_dmem_migrate_to_ram() on the success path, and
- nouveau_dmem_migrate_copy_one() on the copy-error path.

For an order > 0 folio this unmaps less than was mapped, leaking the remainder of the IOMMU/IOVA mapping. The other unmap sites, in nouveau_dmem_migrate_chunk() and nouveau_dmem_evict_chunk(), already use the saved size; use it here too.

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

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

	Issue introduced in 6.19 with commit c3228747107705d47c7e9a03598a434a0380cb73 and fixed in 7.2.5 with commit 4deb29b9d33bfdb3de4d2d9944947ecf77221e42
	Issue introduced in 6.19 with commit c3228747107705d47c7e9a03598a434a0380cb73 and fixed in 7.3-rc2 with commit caa1bc2a0a6ca19dcb90bbf88208b0fe2decd66f

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-89804

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/nouveau/nouveau_dmem.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/4deb29b9d33bfdb3de4d2d9944947ecf77221e42
	https://git.kernel.org/stable/c/caa1bc2a0a6ca19dcb90bbf88208b0fe2decd66f