В ядре Linux устранена следующая уязвимость:
drm/i915/gem: инициализация нулями массива eb.vma в i915_gem_do_execbuffer
Инициализируйте массив eb.vma значениями 0, когда структура eb
сначала настроил. В частности, это устанавливает указатели eb->vma[i].vma на
NULL, что упрощает очистку и избавляет от ошибки, описанной ниже. Во время выполнения eb_lookup_vmas() массив eb->vma
последовательно заполняется объектами структуры eb_vma.
Этот процесс включает в себя
вызов eb_add_vma(), который может завершиться неудачно; однако даже в случае
ошибка, eb->vma[i].vma устанавливается для текущего обрабатываемого буфера. Если eb_add_vma() завершается неудачно, eb_lookup_vmas() возвращает ошибку, что
предлагает вызвать eb_release_vmas(), чтобы навести порядок. Поскольку
eb_lookup_vmas() может завершиться ошибкой во время обработки любого (возможно, не первого)
буфер, eb_release_vmas() проверяет, равно ли значение vma буфера NULL, чтобы узнать
в какой момент функция поиска не удалась.
В eb_lookup_vmas() eb->vma[i].vma устанавливается в NULL, если вспомогательный
функция eb_lookup_vma() или eb_validate_vma() завершается с ошибкой. eb->vma[i+1].vma — это
устанавливается в NULL в случае сбоя i915_gem_object_userptr_submit_init(); тот
текущий нужно очистить с помощью eb_release_vmas() на этом этапе,
Итак, следующий установлен. Если eb_add_vma() завершается неудачно, ни текущий, ни
следующая vma установлена в NULL, что является источником ошибки разыменования NULL.
описано в проблеме, указанной в теге Closes. При входе в eb_lookup_vmas() указатели vma устанавливаются на плиту.
значение отравления вместо NULL.
Это не имеет значения для фактического
поиск, поскольку он все равно перезаписывается, однако функция eb_release_vmas()
функция распознает только NULL как останавливающее значение, следовательно, указатели
устанавливаются в NULL в случае промежуточного сбоя. Это
патч меняет подход к заполнению их всех NULL в начале
вместо этого вместо того, чтобы обрабатывать это вручную во время сбоя.
(вишня выбрана из коммита 08889b706d4f0b8d2352b7ca29c2d8df4d0787cd)
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: drm/i915/gem: Zero-initialize the eb.vma array in i915_gem_do_execbuffer Initialize the eb.vma array with values of 0 when the eb structure is first set up. In particular, this sets the eb->vma[i].vma pointers to NULL, simplifying cleanup and getting rid of the bug described below. During the execution of eb_lookup_vmas(), the eb->vma array is successively filled up with struct eb_vma objects. This process includes calling eb_add_vma(), which might fail; however, even in the event of failure, eb->vma[i].vma is set for the currently processed buffer. If eb_add_vma() fails, eb_lookup_vmas() returns with an error, which prompts a call to eb_release_vmas() to clean up the mess. Since eb_lookup_vmas() might fail during processing any (possibly not first) buffer, eb_release_vmas() checks whether a buffer's vma is NULL to know at what point did the lookup function fail. In eb_lookup_vmas(), eb->vma[i].vma is set to NULL if either the helper function eb_lookup_vma() or eb_validate_vma() fails. eb->vma[i+1].vma is set to NULL in case i915_gem_object_userptr_submit_init() fails; the current one needs to be cleaned up by eb_release_vmas() at this point, so the next one is set. If eb_add_vma() fails, neither the current nor the next vma is set to NULL, which is a source of a NULL deref bug described in the issue linked in the Closes tag. When entering eb_lookup_vmas(), the vma pointers are set to the slab poison value, instead of NULL. This doesn't matter for the actual lookup, since it gets overwritten anyway, however the eb_release_vmas() function only recognizes NULL as the stopping value, hence the pointers are being set to NULL as they go in case of intermediate failure. This patch changes the approach to filling them all with NULL at the start instead, rather than handling that manually during failure. (cherry picked from commit 08889b706d4f0b8d2352b7ca29c2d8df4d0787cd)
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 13
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.16.1
|
6.1.160
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.2
|
6.6.120
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.7
|
6.12.64
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.13
|
6.18.4
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:5.16:-:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.19:rc1:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.19:rc2:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.19:rc3:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.19:rc4:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.19:rc5:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.19:rc6:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.19:rc7:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.19:rc8:*:*:*:*:*:*
|
— | — |