🇰🇷 한글 설명
Linux 커널의 bpf 및 fork 과정에서 프로세스 복제 중 오류가 발생할 경우, 초기화되지 않은 bpf_storage 포인터를 해제하려고 시도하는 취약점입니다. 이로 인해 커널 중단(Hang) 또는 Use-After-Free(UAF)와 같은 심각한 메모리 오류가 발생할 수 있습니다.
💡 쉬운 설명
새로운 프로세스를 만들다가 문제가 생겨 취약한 상태로 종료될 때, 컴퓨터의 핵심 메모리를 잘못 건드려 시스템이 멈추거나 해킹될 수 있는 문제입니다. 프로세스를 복제하는 과정에서 정리 작업이 제대로 이루어지지 않아 발생합니다.
🇺🇸 원문 (English)
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.
📍 영향받는 시스템
bpf task storage map을 사용하는 Linux 커널 버전
⚔️ 공격 벡터
bpf task storage map에 등록된 프로세스가 fork() 시스템 호출을 수행하여 특정 조건(RLIMIT_NPROC 제한 등)을 유도함
🛡️ 대응 방법
해당 취약점이 수정된 최신 Linux 커널 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 취약점이 패치된 최신 보안 업데이트 버전인지 확인