В ядре Linux устранена следующая уязвимость:
powerpc/bpf: исправлен расчет размера JIT-кода батута bpf.
Arch_bpf_trampoline_size() предоставляет JIT-размер батута BPF.
до того, как будет выделен буфер для JIT'инга. Общее количество
инструкции, выдаваемые для JIT-кода батута BPF, зависят от того, где
находится окончательное изображение. Итак, размер получен с помощью манекена.
проход в Arch_bpf_trampoline_size() может отличаться от фактического размера
необходимо в Arch_prepare_bpf_trampoline().
Когда инструкции
учтенное в Arch_bpf_trampoline_size(), меньше количества
инструкции, генерируемые во время фактической JIT-компиляции батута,
выдается следующее предупреждение:
ВНИМАНИЕ: ЦП: 8 PID: 204190 в Arch/powerpc/net/bpf_jit_comp.c:981 __arch_prepare_bpf_trampoline.isra.0+0xd2c/0xdcc
что такое:
/* Убедитесь, что логика генерации батута не переполняется */
if (изображение && WARN_ON_ONCE(&image[ctx->idx] >
(u32 *)rw_image_end - BPF_INSN_SAFETY)) {
Итак, во время фиктивного прохода вместо предоставления произвольного изображения
место, учтите максимально возможные инструкции, если и когда там
это зависимость с расположением образа для JIT-компиляции.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: powerpc/bpf: fix JIT code size calculation of bpf trampoline arch_bpf_trampoline_size() provides JIT size of the BPF trampoline before the buffer for JIT'ing it is allocated. The total number of instructions emitted for BPF trampoline JIT code depends on where the final image is located. So, the size arrived at with the dummy pass in arch_bpf_trampoline_size() can vary from the actual size needed in arch_prepare_bpf_trampoline(). When the instructions accounted in arch_bpf_trampoline_size() is less than the number of instructions emitted during the actual JIT compile of the trampoline, the below warning is produced: WARNING: CPU: 8 PID: 204190 at arch/powerpc/net/bpf_jit_comp.c:981 __arch_prepare_bpf_trampoline.isra.0+0xd2c/0xdcc which is: /* Make sure the trampoline generation logic doesn't overflow */ if (image && WARN_ON_ONCE(&image[ctx->idx] > (u32 *)rw_image_end - BPF_INSN_SAFETY)) { So, during the dummy pass, instead of providing some arbitrary image location, account for maximum possible instructions if and when there is a dependency with image location for JIT'ing.
Характеристики атаки
Последствия
Строка CVSS v3.1
Уязвимые продукты 1
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.13
|
6.15.4
|