В ядре Linux устранена следующая уязвимость:
clk: samsung: exynos-clkout: назначьте .num перед доступом к .hws
Зафиксируйте f316cdff8d67 («clk: аннотируйте структуру clk_hw_onecell_data с помощью
__counted_by") аннотировал член hws структуры clk_hw_onecell_data.
с __counted_by, который сообщает дезинфицирующему средству границ (UBSAN_BOUNDS)
о количестве элементов в .hws[], чтобы он мог предупреждать, когда .hws[]
доступ осуществляется за пределами границ. Как отмечено в этом изменении, __counted_by
член должен быть инициализирован количеством элементов до первого
происходит доступ к массиву, иначе при каждом доступе будет предупреждение
до инициализации, поскольку количество элементов равно нулю. Это
происходит в exynos_clkout_probe() из-за того, что .num назначается после .hws[]
был получен доступ:
UBSAN: индекс массива за пределами границ в драйверах/clk/samsung/clk-exynos-clkout.c:178:18
индекс 0 выходит за пределы диапазона для типа 'clk_hw *[*]'
Переместите инициализацию .num до первого доступа к .hws[],
очистка предупреждения.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: clk: samsung: exynos-clkout: Assign .num before accessing .hws Commit f316cdff8d67 ("clk: Annotate struct clk_hw_onecell_data with __counted_by") annotated the hws member of 'struct clk_hw_onecell_data' with __counted_by, which informs the bounds sanitizer (UBSAN_BOUNDS) about the number of elements in .hws[], so that it can warn when .hws[] is accessed out of bounds. As noted in that change, the __counted_by member must be initialized with the number of elements before the first array access happens, otherwise there will be a warning from each access prior to the initialization because the number of elements is zero. This occurs in exynos_clkout_probe() due to .num being assigned after .hws[] has been accessed: UBSAN: array-index-out-of-bounds in drivers/clk/samsung/clk-exynos-clkout.c:178:18 index 0 is out of range for type 'clk_hw *[*]' Move the .num initialization to before the first access of .hws[], clearing up the warning.
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 12
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.6.1
|
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:6.6:-:*:*:*:*:*:*
|
— | — |
|
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:*:*:*:*:*:*
|
— | — |