В ядре Linux устранена следующая уязвимость:
drm/amdgpu/gfx: исправлено переполнение буфера IB более чистого шейдера. Путь sysfs более чистого шейдера выделяет IB из 16 слов (64 байта), но
неправильно заполняет (align_mask + 1) dwords. На кольцах GFX align_mask равен
0xff, поэтому цикл записал 256 dword в 64-байтовый буфер, что привело к
Ошибка страницы ядра.
Для планирования задания IB должен быть только минимальной оболочкой NOP; тот
Сам более чистый шейдер генерируется на кольце с помощью emmit_cleaner_shader(). Заполните 16 dwords, чтобы они соответствовали распределению.
v2: использовать переменную ib_size_dw (Lijo)
(вишня выбрана из коммита bf21af331ebf72d0935fd70c73192414a422c03a)
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: drm/amdgpu/gfx: fix cleaner shader IB buffer overflow The cleaner shader sysfs path allocates a 16-dword (64 byte) IB but incorrectly fills (align_mask + 1) dwords. On GFX rings align_mask is 0xff, so the loop wrote 256 dwords into a 64-byte buffer, causing a kernel page fault. The IB only needs to be a minimal NOP shell to schedule the job; the cleaner shader itself is emitted on the ring via emit_cleaner_shader(). Fill 16 dwords to match the allocation. v2: Use ib_size_dw variable (Lijo) (cherry picked from commit bf21af331ebf72d0935fd70c73192414a422c03a)