В ядре Linux устранена следующая уязвимость:
fgraph: добавить READ_ONCE() при доступе к fgraph_array[]
В __ftrace_return_to_handler() цикл перебирает fgraph_array[]
элементы, которые являются fgraph_ops. Цикл проверяет, является ли элемент
fgraph_stub, чтобы предотвратить использование fgraph_stub в дальнейшем. Однако если компилятор перезагрузит fgraph_array[] после этой проверки, он может
гонка с обновлением fgraph_array[], которое представляет fgraph_stub.
Это
может привести к обработке заглушки, но она содержит нулевое значение
поле «func_hash», что приводит к разыменованию нулевого указателя. Чтобы гарантировать, что gops, сравниваемые с fgraph_stub, соответствуют gops
обрабатывается позже, добавьте READ_ONCE(). Аналогичный патч появляется в коммите
63a8dfb («function_graph: добавьте READ_ONCE() при доступе к fgraph_array[]»).
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: fgraph: Add READ_ONCE() when accessing fgraph_array[] In __ftrace_return_to_handler(), a loop iterates over the fgraph_array[] elements, which are fgraph_ops. The loop checks if an element is a fgraph_stub to prevent using a fgraph_stub afterward. However, if the compiler reloads fgraph_array[] after this check, it might race with an update to fgraph_array[] that introduces a fgraph_stub. This could result in the stub being processed, but the stub contains a null "func_hash" field, leading to a NULL pointer dereference. To ensure that the gops compared against the fgraph_stub matches the gops processed later, add a READ_ONCE(). A similar patch appears in commit 63a8dfb ("function_graph: Add READ_ONCE() when accessing fgraph_array[]").
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 6
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.11
|
6.12.9
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.13:rc1:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.13:rc2:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.13:rc3:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.13:rc4:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.13:rc5:*:*:*:*:*:*
|
— | — |