Skip to contentSkip to conversation

CVE-2026-93233: drm/nouveau/dmem: fix callocated underflow on large folio split

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 24

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 callocated underflow on large folio split

nouveau_dmem_folio_free() drops chunk->callocated once per freed folio, while a large (compound) device-private folio is only counted once when it is allocated. When such a folio is split, the mm core invokes ->folio_split() (nouveau_dmem_folio_split()) once for each new sub-folio, but the hook only fixes up the sub-folio metadata and leaves chunk->callocated unchanged.

Each resulting sub-folio is later freed separately, so after a split the single allocation (+1) is met by N frees (-N), leaving chunk->callocated short by N-1. On the first split/free cycle it
underflows: WARN_ON(!chunk->callocated) fires, the unsigned counter wraps and never returns to zero, so the chunk can no longer be reclaimed (nouveau_dmem_fini() also warns on the leaked count).

Account for the new sub-folio in the split hook, under the same lock as nouveau_dmem_folio_free(), so the count stays balanced.

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

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

	Issue introduced in 6.19 with commit c3228747107705d47c7e9a03598a434a0380cb73 and fixed in 7.2.5 with commit 0163b92946d0a7c816f619c57a4d9867954dd106
	Issue introduced in 6.19 with commit c3228747107705d47c7e9a03598a434a0380cb73 and fixed in 7.3-rc2 with commit c2256c044a1df39c8aad4dd2d6f709b2533e2d7a

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

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/0163b92946d0a7c816f619c57a4d9867954dd106
	https://git.kernel.org/stable/c/c2256c044a1df39c8aad4dd2d6f709b2533e2d7a