В ядре Linux устранена следующая уязвимость:
bpf,fork: стереть ->bpf_storage перед аварийными операциями, которые получают к нему доступ
В настоящее время copy_process() может перейти в free_task() перед p->bpf_storage.
был инициализирован с помощью этого графа вызовов (показанного здесь для
!CONFIG_MEMCG случай):
copy_process
dup_task_struct
Arch_dup_task_struct
[копирует всю структуру Task_struct, включая элемент ->bpf_storage]
[Проверка RLIMIT_NPROC не удалась]
Delayed_free_task
free_task
bpf_task_storage_free
rcu_dereference (задача-> bpf_storage)
bpf_local_storage_destroy
В этом случае элемент ->bpf_storage зарождающейся задачи, который
bpf_local_storage_destroy() является простой копией родительского файла.
-> указатель bpf_storage, а не настоящий инициализированный указатель.
Это приводит к нехорошему состоянию (зависание ядра, UAF).
Это достижимо, пока вставлен процесс, вызывающий fork().
в карту хранения задач.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: bpf,fork: wipe ->bpf_storage before bailouts that access it Currently, copy_process() can bail out to free_task() before p->bpf_storage has been initialized, with this call graph (shown here for the !CONFIG_MEMCG case): copy_process dup_task_struct arch_dup_task_struct [copies the entire task_struct, including ->bpf_storage member] [RLIMIT_NPROC check fails] delayed_free_task free_task bpf_task_storage_free rcu_dereference(task->bpf_storage) bpf_local_storage_destroy In this case, the nascent task's ->bpf_storage member that bpf_local_storage_destroy() operates on is a plain copy of the parent's ->bpf_storage pointer, not a real initialized pointer. This leads to badness (kernel hangs, UAF). This is reachable as long as the process calling fork() has been inserted into a task storage map.
Характеристики атаки
Последствия
Строка CVSS v3.1