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

Published Oct 6, 2026
·
Updated

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

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

ttmttswapout() 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 ttmboswapout() infinite LRU walk on swapout failure") moved the bulkmove bookkeeping in ttmboswapoutcb() under "if (!ret)", so the ttmresourcedelbulkmoveunevictable() / ttmresourcemovetolrutail() pair is now skipped on every successful swapout. The equivalent change for the shrinker in commit 1d59f36e95f7 ("drm/ttm: Fix ttmboshrink() 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 bulkmove before the swapout; since then a swapped-out resource stays inside its BO's bulkmove range (and on the manager LRU) although it is unevictable. When it is later freed or the BO leaves the bulkmove (ttmresourcefree(), ttmbosetbulkmove() via amdgpuvmbodel()), ttmresourcedelbulkmove() skips it because of its !ttmresourceunevictable() guard, so a range endpoint in pos->first / pos->last is left pointing at freed memory. The next ttmlrubulkmovetail() or ttmresourceaddbulkmove() on that cursor is a use-after-free, seen as the resv WARN in ttmlrubulkmoveadd(), "listdel corruption" in ttmresourcemovetolrutail() or a NULL dereference in ttmresourcemanagernext() -- 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 ttmttswapout() calls and zero ttmresourcedelbulkmoveunevictable() calls. With this change the removal happens for every swapped-out resource and 12 further cycles were clean.

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Linux kernel to a version that resolves this vulnerability.

    Fixed in 7.0.0-31Patch b2ed01e7ad3d

Event History

Oct 6, 2026
CVE Published
via MITRE·08:44 AM
Data Sourced
via MITRE·08:44 AM
DescriptionSeverity
Data Sourced
via NVD·09:17 AM
DescriptionSeverity
Sep 6, 58736
Event
via FIRST·03:56 PM

Frequently Asked Questions

1

What level of access does an attacker need to exploit this issue?

The CVSS vector indicates local access and low privileges are required. No user interaction is required.

2

What could successful exploitation affect?

The CVSS assessment rates confidentiality, integrity, and availability impacts as high.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203