In the Linux kernel, the following vulnerability has been resolved: drm/amdgpu: check ras and obj before dereference nbio_v7_9_handle_ras_controller_intr_no_bifring() dereferences ras and obj without checking either for NULL. И amdgpu_ras_get_context() и amdgpu_ras_find_obj() могут возвращать NULL, например, во время окна между установкой adev->nbio.ras (в начале amdgpu_ras_init(), по замыслу, чтобы как можно скорее включить прерывание фатальной ошибки) и объектом PCIE_BIF ras, фактически создаваемым в RAS late_init. Любое прерывание в этом окне падает в жестком контексте IRQ.
Это аналогично фиксации d190b459b2a4 («drm/amdgpu: the warning dereferencing obj for nbio_v7_4»), который исправил ту же проблему в обработчике nbio_v7_4. Обнаружены Linux Verification Center (linuxtesting.org) с помощью SVACE. (Вишня выбрана из commit c7071767a50a32ed727cf800ac84372429e3b4b3)
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: drm/amdgpu: check ras and obj before dereference nbio_v7_9_handle_ras_controller_intr_no_bifring() dereferences ras and obj without checking either for NULL. Both amdgpu_ras_get_context() and amdgpu_ras_find_obj() can return NULL, e.g. during the window between adev->nbio.ras being set (early in amdgpu_ras_init(), by design, to enable the fatal-error interrupt as soon as possible) and the PCIE_BIF ras object actually being created in RAS late_init. Any interrupt in that window crashes in hard-IRQ context. This is analogous to commit d190b459b2a4 ("drm/amdgpu: the warning dereferencing obj for nbio_v7_4"), which fixed the same issue in the nbio_v7_4 handler. Found by Linux Verification Center (linuxtesting.org) with SVACE. (cherry picked from commit c7071767a50a32ed727cf800ac84372429e3b4b3)