CVE-2026-52965: drm/ttm: Fix ttm_bo_swapout() infinite LRU walk on swapout failure
In the Linux kernel, the following vulnerability has been resolved:
drm/ttm: Fix ttmboswapout() infinite LRU walk on swapout failure
When ttmttswapout() fails, the current code calls ttmresourceaddbulkmove() followed by ttmresourcemovetolrutail() to restore the resource's bulkmove membership.
However, ttmresourcemovetolrutail() places the resource at the tail of the LRU list which, relative to the walk cursor's hitch node (placed immediately after the resource when it was yielded), puts the resource in front of the the hitch. The next listforeachentrycontinue() from the hitch finds the same resource again, causing an infinite loop.
Fix by deferring delbulkmove to the success path only.
On the success path, TTMTTFLAGSWAPPED has just been set by ttmttswapout() but the resource is still tracked in the bulkmove range, so ttmresourcedelbulkmove()'s !ttmresourceunevictable() guard would incorrectly skip the removal. Introduce ttmresourcedelbulkmoveunevictable() which bypasses that guard.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
Defer ttm_resource_del_bulk_move() to the success path only, and use ttm_resource_del_bulk_move_unevictable() when ttm_tt_swapout() fails to restore the resource's bulk_move membership and prevent an infinite LRU walk.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-52965?
CVE-2026-52965 has a risk rating of 17, indicating a significant vulnerability in the Linux kernel.
What causes CVE-2026-52965?
CVE-2026-52965 is caused by an infinite LRU walk occurring on swapout failure in the drm/ttm subsystem of the Linux kernel.
How do I fix CVE-2026-52965?
To fix CVE-2026-52965, update the Linux kernel to the latest version where this vulnerability has been addressed.
Which software is affected by CVE-2026-52965?
CVE-2026-52965 affects the Linux kernel specifically within the drm/ttm subsystem.
When was CVE-2026-52965 published?
CVE-2026-52965 was published on June 24, 2026.