В ядре Linux устранена следующая уязвимость:
fprobe: исправлена ошибка, из-за которой функция unregister_fprobe() ждала льготного периода RCU. Коммит 4346ba1604093 («fprobe: переписать fprobe в трассировщике функционального графа»)
изменил fprobe, чтобы зарегистрировать структуру fprobe в rcu-hlist, но забыл
дождаться RCU GP. Таким образом, может быть использование после освобождения, если fprobe
выпущен сразу после отмены регистрации.
Это может произойти на fprobe
событие и пример кода модуля. Чтобы устранить эту проблему, добавьтеsync_rcu() в unregister_fprobe(). Обратите внимание, что с BPF все в порядке, поскольку fprobe используется как часть
bpf_kprobe_multi_link.
Это отменяет регистрацию его fprobe в
bpf_kprobe_multi_link_release() и он освобождается через
bpf_kprobe_multi_link_dealloc(), который вызывается из
bpf_link_defer_dealloc_rcu_gp() Обратный вызов RCU. Для BPF это также привело к появлению функции unregister_fprobe_async(), которая
НЕ дожидайтесь льготного периода RCU.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: fprobe: Fix unregister_fprobe() to wait for RCU grace period Commit 4346ba1604093 ("fprobe: Rewrite fprobe on function-graph tracer") changed fprobe to register struct fprobe to an rcu-hlist, but it forgot to wait for RCU GP. Thus there can be use-after-free if the fprobe is released right after unregistering. This can be happened on fprobe event and sample module code. To fix this issue, add synchronize_rcu() in unregister_fprobe(). Note that BPF is OK because fprobe is used as a part of bpf_kprobe_multi_link. This unregisters its fprobe in bpf_kprobe_multi_link_release() and it is deallocated via bpf_kprobe_multi_link_dealloc(), which is invoked from bpf_link_defer_dealloc_rcu_gp() RCU callback. For BPF, this also introduced unregister_fprobe_async() which does NOT wait for RCU grace priod.
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 5
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.14
|
6.18.34
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.19
|
7.0.11
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc1:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc2:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc3:*:*:*:*:*:*
|
— | — |