В ядре Linux устранена следующая уязвимость:
drm/amd/display: Избегайте гонки между dcn35_set_drr() и dc_state_destruct().
dc_state_destruct() обнуляет контекст ресурса состояния DC. Труба
контекст, передаваемый в dcn35_set_drr(), является членом этого контекста ресурса. Если dc_state_destruct() вызывается параллельно с обработкой IRQ (которая
в какой-то момент вызывает dcn35_set_drr()), мы можем в конечном итоге использовать уже обнуленные
Поля обратного вызова функции структурыstream_resource.
Логика в dcn35_set_drr() уже пытается избежать этого, проверяя tg
против НУЛЯ. Но если обнуление происходит сразу после проверки NULL и
до следующего доступа, тогда получим гонку. Чтобы избежать этого, сначала скопируйте tg в локальную переменную, а затем используйте это
переменная для всех операций.
Это должно работать, пока никто освобождает пул ресурсов, в котором живут генераторы синхронизации. (вишня выбрана из коммита 0607a50c004798a96e62c089a4c34c220179dcb5)
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: drm/amd/display: Avoid race between dcn35_set_drr() and dc_state_destruct() dc_state_destruct() nulls the resource context of the DC state. The pipe context passed to dcn35_set_drr() is a member of this resource context. If dc_state_destruct() is called parallel to the IRQ processing (which calls dcn35_set_drr() at some point), we can end up using already nulled function callback fields of struct stream_resource. The logic in dcn35_set_drr() already tries to avoid this, by checking tg against NULL. But if the nulling happens exactly after the NULL check and before the next access, then we get a race. Avoid this by copying tg first to a local variable, and then use this variable for all the operations. This should work, as long as nobody frees the resource pool where the timing generators live. (cherry picked from commit 0607a50c004798a96e62c089a4c34c220179dcb5)
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 8
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.7
|
6.10.11
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.11:rc1:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.11:rc2:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.11:rc3:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.11:rc4:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.11:rc5:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.11:rc6:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.11:rc7:*:*:*:*:*:*
|
— | — |