🇰🇷 한글 설명
Linux 커널의 BPF(Berkeley Packet Filter) 구성 요소 중 compute_effective_progs() 함수에서 Use-After-Free(UAF) 취약점이 발견되었습니다. BPF 링크를 분리하는 과정에서 메모리 할당 실패 시 이미 해제된 포인터를 참조하게 되어 KASAN 오류를 유발합니다.
💡 쉬운 설명
컴퓨터의 메모리를 관리하는 과정에서 이미 사용이 끝난 메모리 주소를 다시 사용하려고 시도하는 오류입니다. 이로 인해 시스템이 갑자기 멈추거나 보안 문제가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
bpf: Fix KASAN use-after-free Read in compute_effective_progs
Syzbot found a Use After Free bug in compute_effective_progs().
The reproducer creates a number of BPF links, and causes a fault
injected alloc to fail, while calling bpf_link_detach on them.
Link detach triggers the link to be freed by bpf_link_free(),
which calls __cgroup_bpf_detach() and update_effective_progs().
If the memory allocation in this function fails, the function restores
the pointer to the bpf_cgroup_link on the cgroup list, but the memory
gets freed just after it returns. After this, every subsequent call to
update_effective_progs() causes this already deallocated pointer to be
dereferenced in prog_list_length(), and triggers KASAN UAF error.
To fix this issue don't preserve the pointer to the prog or link in the
list, but remove it and replace it with a dummy prog without shrinking
the table. The subsequent call to __cgroup_bpf_detach() or
__cgroup_bpf_detach() will correct it.
📍 영향받는 시스템
BPF 기능을 사용하는 Linux 커널 버전 (패치 적용 전 버전)
⚔️ 공격 벡터
특수하게 조작된 BPF 링크 생성 및 분리 요청을 통한 메모리 오류 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 최신 패치 버전인지 확인하십시오.