В ядре Linux устранена следующая уязвимость:
MIPS: ftrace: исправлено повреждение памяти, когда ядро находится за пределами 32 бит. С момента фиксации e424054000878 («MIPS: Трассировка: сокращение накладных расходов
динамический Function Tracer"), использовался макрос UASM_i_LA_mostly,
и этот макрос может генерировать более двух инструкций. В то же время
время код в ftrace предполагает, что не более 2 инструкций могут
быть сгенерированы, поэтому они сохраняются в массиве int[2].
Однако, как уже отмечалось ранее, макрос UASM_i_LA_mostly (а теперь и UASM_i_LA) вызывает переполнение буфера, когда _mcount превышает 32 бита. Это приводит к повреждение переменных, расположенных в разделе __read_mostly. Это искажение наблюдалось потому, что переменная __cpu_primary_thread_mask был поврежден, что привело к очень раннему зависанию во время загрузки.
Это исправление предотвращает повреждение, избегая создания
инструкции, если они могут превысить 2 инструкции в
длина. К счастью, insn_la_mcount используется только в том случае, если инструментированный
код расположен вне раздела кода ядра, поэтому динамическая трассировка может
использоваться до сих пор, хотя и в более ограниченном объеме. Это все еще
предпочтительнее повреждения памяти и/или сбоя ядра.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: MIPS: ftrace: Fix memory corruption when kernel is located beyond 32 bits Since commit e424054000878 ("MIPS: Tracing: Reduce the overhead of dynamic Function Tracer"), the macro UASM_i_LA_mostly has been used, and this macro can generate more than 2 instructions. At the same time, the code in ftrace assumes that no more than 2 instructions can be generated, which is why it stores them in an int[2] array. However, as previously noted, the macro UASM_i_LA_mostly (and now UASM_i_LA) causes a buffer overflow when _mcount is beyond 32 bits. This leads to corruption of the variables located in the __read_mostly section. This corruption was observed because the variable __cpu_primary_thread_mask was corrupted, causing a hang very early during boot. This fix prevents the corruption by avoiding the generation of instructions if they could exceed 2 instructions in length. Fortunately, insn_la_mcount is only used if the instrumented code is located outside the kernel code section, so dynamic ftrace can still be used, albeit in a more limited scope. This is still preferable to corrupting memory and/or crashing the kernel.
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 11
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
2.6.35.1
|
6.12.64
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.13
|
6.18.3
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:2.6.35:-:*:*:*:*:*:*
|
— | — |
|
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:*:*:*:*:*:*
|
— | — |