В ядре Linux устранена следующая уязвимость:
fprobe: переработанный выпуск после отмены регистрации ftrace_ops. При запуске самотестирования bpf можно получить следующую ошибку:
общая ошибка защиты, возможно, для неканонического адреса \
0x6b6b6b6b6b6b6b6b: 0000 [#1] ПРЕДВАРИТЕЛЬНЫЙ SMP DEBUG_PAGEALLOC NOPTI
... Отслеживание вызова:
<ЗАДАЧА>
fprobe_handler+0xc1/0x270
? __pfx_bpf_testmod_init+0x10/0x10
? __pfx_bpf_testmod_init+0x10/0x10
? bpf_fentry_test1+0x5/0x10
? bpf_fentry_test1+0x5/0x10
? bpf_testmod_init+0x22/0x80
? do_one_initcall+0x63/0x2e0
? rcu_is_watching+0xd/0x40
? kmalloc_trace+0xaf/0xc0
? do_init_module+0x60/0x250
? __do_sys_finit_module+0xac/0x120
? do_syscall_64+0x37/0x90
? запись_SYSCALL_64_after_hwframe+0x72/0xdc
</TASK>
В функции unregister_fprobe мы не можем освободить fp->rethook, пока он
возможно, некоторые из его пользователей все еще работают на другом процессоре.
Перемещение вызова rethook_free после отмены регистрации fp->ops с помощью
вызов unregister_ftrace_function.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: fprobe: Release rethook after the ftrace_ops is unregistered While running bpf selftests it's possible to get following fault: general protection fault, probably for non-canonical address \ 0x6b6b6b6b6b6b6b6b: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC NOPTI ... Call Trace: <TASK> fprobe_handler+0xc1/0x270 ? __pfx_bpf_testmod_init+0x10/0x10 ? __pfx_bpf_testmod_init+0x10/0x10 ? bpf_fentry_test1+0x5/0x10 ? bpf_fentry_test1+0x5/0x10 ? bpf_testmod_init+0x22/0x80 ? do_one_initcall+0x63/0x2e0 ? rcu_is_watching+0xd/0x40 ? kmalloc_trace+0xaf/0xc0 ? do_init_module+0x60/0x250 ? __do_sys_finit_module+0xac/0x120 ? do_syscall_64+0x37/0x90 ? entry_SYSCALL_64_after_hwframe+0x72/0xdc </TASK> In unregister_fprobe function we can't release fp->rethook while it's possible there are some of its users still running on another cpu. Moving rethook_free call after fp->ops is unregistered with unregister_ftrace_function call.
Характеристики атаки
Последствия
Строка CVSS v3.1
Уязвимые продукты 3
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.18
|
6.1.40
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.2
|
6.4.5
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.5:rc1:*:*:*:*:*:*
|
— | — |