data built 2026-10-19T13:16:53Z

Look up another CVE · open CVE-2026-98166 in the interactive tracker

CVE-2026-98166

drm/ttm: fix swapped-out resources never leaving their bulk_move range

7.8 EPSS 0.2% AV:L

Published 2026-10-06 (13 days ago) by the Linux kernel CNA. Subsystem drivers/gpu. Debian urgency: unimportant.

What to do, per Debian release

Debian's own status for CVE-2026-98166 in every release this site tracks, and what each one means in practice. Every status below is the one the Debian Security Team publishes for this CVE. source

ReleaseStatus VersionWhat this means
Debian 12bookwormnot affected6.1.190-1Nothing to do. bookworm never shipped the vulnerable code.
Debian 13trixienot affected6.12.113-1Nothing to do. trixie never shipped the vulnerable code.
Debian 14forkyfixed7.2.8-1Update the kernel and reboot. Fixed in 7.2.8-1. A running kernel keeps the old code until the machine restarts.
Debian unstablesidfixed7.2.8-1Update the kernel and reboot. Fixed in 7.2.8-1. A running kernel keeps the old code until the machine restarts.

The vulnerability

What the bug is

ttm_tt_swapout() returns the number of pages swapped out on success and a negative error code on failure; for a populated ttm it never returns zero. Commit b2ed01e7ad3d ("drm/ttm: Fix ttm_bo_swapout() infinite LRU walk on swapout failure") moved the bulk_move bookkeeping in ttm_bo_swapout_cb() under "if (!ret)", so the ttm_resource_del_bulk_move_unevictable() / ttm_resource_move_to_lru_tail() pair is now skipped on every successful swapout. The equivalent change for the shrinker in commit 1d59f36e95f7 ("drm/ttm: Fix ttm_bo_shrink() infinite LRU walk on backup failure") tests "lret > 0", which is what was intended here as well. Before b2ed01e7ad3d the resource was taken off the bulk_move before the swapout; since then a swapped-out resource stays inside its BO's bulk_move range (and on the manager LRU) although it is unevictable. When it is later freed or the BO leaves the bulk_move (ttm_resource_free(), ttm_bo_set_bulk_move() via amdgpu_vm_bo_del()), ttm_resource_del_bulk_move() skips it because of its !ttm_resource_unevictable() guard, so a range endpoint in pos->first / pos->last is left pointing at freed memory. The next ttm_lru_bulk_move_tail() or ttm_resource_add_bulk_move() on that cursor is a use-after-free, seen as the resv WARN in ttm_lru_bulk_move_add(), "list_del corruption" in ttm_resource_move_to_lru_tail() or a NULL dereference in ttm_resource_manager_next() -- minutes to hours after a hibernation, or at process exit / reboot following one. Samuel Ainsworth's analysis of drm/amd issue 5387 (see Link) identified the dangling cursor; the missing removal at swapout time is the reason it dangles. Testing the condition for success restores the removal. On an AMD Phoenix APU (ASUS UM3406GA, gfx1103) running suspend-then-hibernate on a 7.0.y stable kernel carrying the backport (Ubuntu 7.0.0-31) the bug crashed 5 of 18 hibernation cycles; a function profile of one hibernation showed 336 ttm_tt_swapout() calls and zero ttm_resource_del_bulk_move_unevictable() calls. With this change the removal happens for every swapped-out resource and 12 further cycles were clean.

Where it lives

The fix touches these files. If the subsystem is one you do not use, the practical exposure is lower, though the package is still the vulnerable one.

drivers/gpu/drm/ttm/ttm_bo.c

What this is
DRM TTM SUBSYSTEMMAINTAINERS section matched on drivers/gpu/drm/ttm/ · dri-devel@lists.freedesktop.org · Maintained
Kernel module
ttm

Check it on the machine

grep -w CONFIG_DRM_TTM /boot/config-$(uname -r)

Reads the booted kernel's own configuration, on the machine and nowhere else. =y is built in, =m is a module, and an is not set line means the code is not there.

lsmod | grep -w ttm

Prints a line if that module is loaded right now, and nothing if it is not. One that is not loaded can still be loaded later by anything that needs it.

Show whether Debian builds this, per release

Debian builds this, but not on every flavour. At least one release below builds the code on some of its kernel flavours and not on others, so the answer depends on the architecture and flavour installed.

  • bookwormMnot built on amd64/cloud-amd64, arm64/cloud-arm64
  • trixieMnot built on amd64/cloud-amd64, arm64/cloud-arm64, armel/rpi, s390x/s390x
  • forky, sidMnot built on amd64/cloud-amd64, arm64/cloud-arm64, s390x/s390x
M
a module where it is built at all; some flavours do not build it
Build switch
CONFIG_DRM_TTM

From the configuration Debian publishes for every kernel flavour it builds. It covers only the architectures Debian ships a linux-config package for, and nothing about a kernel you built yourself. Debian's own status above stays authoritative about the source package.MAINTAINERS kbuild Makefiles Debian linux-config packages

Signals

Published
2026-10-06 (13 days ago)source
CVSS
7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:Hsource recompute it
Attack vector
local (AV:L)source
EPSS
0.15%, higher than 4.1% of all CVEssource
CISA KEV
not listedthe KEV catalogue
Debian urgency
unimportantsource
Subsystem
drivers/gpu

Upstream fixes

The versions the CNA records as introducing and fixing this, and the commit for each. source

IntroducedFixed inCommit
7.17.2.81169fe8c11ca
7.17.33db7d7d58341
6.18.5700
7.0.1000

Why the CNA scored it this way

Quoted from the kernel CNA's own scoring file, word for word. A highlighted metric carries the most severe value CVSS v3.1 defines for it, which is what pushes the score up. source

AV:LAttack vector, local
The attacker drives ttm_bo_swapout_cb() through local DRM render-node ioctls (amdgpu GEM_CREATE with VM_ALWAYS_VALID, then CS), with ttm_tt_populate() calling ttm_global_swapout() once ttm_pages_limit is exceeded, or through hibernation. No remote protocol carries any input.
AC:LAttack complexity, low
Hibernation is not needed: the attacker allocates per-VM BOs past ttm_pages_limit to force swapout, closes the swapped BO so ttm_resource_free() frees a resource still referenced by the bulk_move cursor, then submits CS to run ttm_lru_bulk_move_tail(). Every step is the attacker's own action.
PR:LPrivileges required, low
AMDGPU_GEM_CREATE, GEM_CLOSE and AMDGPU_CS are DRM_RENDER_ALLOW ioctls on /dev/dri/renderD*, open to an ordinary render-group or seat user without root or capabilities.
UI:NUser interaction, none
The attacker runs the whole sequence in their own process with their own buffer objects. No other user has to act.
S:UScope, unchanged
The freed ttm_resource and the corrupted manager LRU lists are kernel memory, so the impact stays within the kernel's own security authority.
C:HConfidentiality impact, high
After ttm_resource_free() frees the swapped resource, bulk_move pos->first/pos->last still point at it, so a reallocated object can be read and walked as a ttm_resource by ttm_lru_bulk_move_tail() and the ttm_lru_next_res()/prev_res() helpers.
I:HIntegrity impact, high
list_bulk_move_tail() and ttm_lru_bulk_move_pos_tail() write list pointers through the dangling cursor into freed memory. The commit message reports this showing up as list_del corruption, a write primitive usable against a sprayed object.
A:HAvailability impact, high
The use-after-free crashes the kernel through list_del corruption, the dma_resv WARN in ttm_lru_bulk_move_add(), or a NULL dereference in ttm_resource_manager_next(). The reporter crashed 5 of 18 hibernation cycles.