В ядре Linux устранена следующая уязвимость:
drm/ttm: исправлена ошибка ttm_bo_swapout() с бесконечным обходом LRU при ошибке замены. Когда ttm_tt_swapout() завершается с ошибкой, текущий код вызывает
ttm_resource_add_bulk_move(), за которым следует ttm_resource_move_to_lru_tail()
чтобы восстановить членство ресурса в Bulk_move. Однако ttm_resource_move_to_lru_tail() помещает ресурс в хвост.
списка LRU, который относительно узла сцепки курсора обхода (размещается
сразу после ресурса, когда он был получен), помещает ресурс
*перед* фаркопом.
Следующий list_for_each_entry_continue() из
заминка снова находит тот же ресурс, вызывая бесконечный цикл. Исправьте это, отложив del_bulk_move только до пути успеха. На пути к успеху TTM_TT_FLAG_SWAPPED только что был установлен
ttm_tt_swapout(), но ресурс по-прежнему отслеживается в диапазоне Bulk_move,
поэтому защита !ttm_resource_unevictable() ttm_resource_del_bulk_move() будет
неправильно пропустить удаление. представить
ttm_resource_del_bulk_move_unevictable(), который обходит эту защиту.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: drm/ttm: Fix ttm_bo_swapout() infinite LRU walk on swapout failure When ttm_tt_swapout() fails, the current code calls ttm_resource_add_bulk_move() followed by ttm_resource_move_to_lru_tail() to restore the resource's bulk_move membership. However, ttm_resource_move_to_lru_tail() 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 list_for_each_entry_continue() from the hitch finds the same resource again, causing an infinite loop. Fix by deferring del_bulk_move to the success path only. On the success path, TTM_TT_FLAG_SWAPPED has just been set by ttm_tt_swapout() but the resource is still tracked in the bulk_move range, so ttm_resource_del_bulk_move()'s !ttm_resource_unevictable() guard would incorrectly skip the removal. Introduce ttm_resource_del_bulk_move_unevictable() which bypasses that guard.
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 4
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.13
|
7.0.10
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc1:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc2:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc3:*:*:*:*:*:*
|
— | — |