В ядре Linux устранена следующая уязвимость:
drm/xe/pt: предотвратить недопустимый доступ к курсору для очищенных BO. Во время обхода таблицы страниц для привязки явно вызывается xe_pt_stage_bind().
пропускает инициализацию xe_res_cursor для очищенных BO, обрабатывая их
аналогично NULL VMA, только устанавливая размер курсора. Однако xe_pt_hugepte_possible() и xe_pt_scan_64K() не проверяли
если BO был очищен перед попыткой перемещения курсора с помощью
xe_res_dma() и xe_res_next().
Потому что курсор остался влево
не инициализирован для очищенных BO, это не выполняется и срабатывает
предупреждения типа:
ВНИМАНИЕ: driver/gpu/drm/xe/xe_res_cursor.h:274 в xe_res_next
Исправьте это, явно проверив, очищается ли BO в обоих
xe_pt_hugepte_possible() и xe_pt_scan_64K(), возвращающиеся раньше
как мы делаем для NULL VMA, полностью избегая недопустимого доступа к курсору. В качестве меры предосторожности также инициализируйте курсор нулями в xe_pt_stage_bind().
чтобы гарантировать, что мы не передаем мусорные данные в средства обхода таблицы страниц
если мы когда-нибудь столкнемся с подобным крайним случаем в будущем.
(вишня выбрана из коммита 4c7b9c6ece32440e5a435a92076d049450cd2d2e)
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: drm/xe/pt: prevent invalid cursor access for purged BOs During a page table walk for binding, xe_pt_stage_bind() explicitly skips initializing the xe_res_cursor for purged BOs, treating them similarly to NULL VMAs by only setting the cursor size. However, xe_pt_hugepte_possible() and xe_pt_scan_64K() did not check if the BO was purged before attempting to walk the cursor using xe_res_dma() and xe_res_next(). Because the cursor was left uninitialized for purged BOs, this falls through and triggers warnings like: WARNING: drivers/gpu/drm/xe/xe_res_cursor.h:274 at xe_res_next Fix this by explicitly checking if the BO is purged in both xe_pt_hugepte_possible() and xe_pt_scan_64K(), returning early just as we do for NULL VMAs, avoiding the invalid cursor accesses entirely. As a precaution, also zero-initialize the cursor in xe_pt_stage_bind() to ensure we don't pass garbage data into the page table walkers if we ever hit a similar edge case in the future. (cherry picked from commit 4c7b9c6ece32440e5a435a92076d049450cd2d2e)
Характеристики атаки
Последствия
Строка CVSS v3.1