🇰🇷 한글 설명
Linux 커널의 eBPF trie_get_next_key() 함수에서 스택 오버플로우 취약점이 발생합니다. max_prefixlen 크기로 할당된 스택에 max_prefixlen+1개의 노드를 기록하여 메모리 손상을 초래합니다.
💡 쉬운 설명
Linux 커널의 데이터 처리 함수가 할당된 버퍼 크기를 초과하여 데이터를 저장하는 버그입니다. 공격자가 특수 eBPF 프로그램으로 이를 악용하면 커널 권한 탈취 또는 시스템 크래시가 가능합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
bpf: Fix out-of-bounds write in trie_get_next_key()
trie_get_next_key() allocates a node stack with size trie->max_prefixlen,
while it writes (trie->max_prefixlen + 1) nodes to the stack when it has
full paths from the root to leaves. For example, consider a trie with
max_prefixlen is 8, and the nodes with key 0x00/0, 0x00/1, 0x00/2, ...
0x00/8 inserted. Subsequent calls to trie_get_next_key with _key with
.prefixlen = 8 make 9 nodes be written on the node stack with size 8.
📍 영향받는 시스템
Linux 커널 5.8~6.0 (eBPF 기능 활성화된 버전)
⚔️ 공격 벡터
특정 eBPF 프로그램을 로드하여 악의적인 trie 데이터 구조를 생성 및 trie_get_next_key() 함수 호출
🛡️ 대응 방법
Linux 커널을 6.1 이상으로 업데이트 또는 CVE-2024-50262 패치 적용
🔧 검증 코드
6.1 이상 출력시 일반적으로 패치됨, 5.x대는 커널 release note에서 CVE-2024-50262 패치 여부 확인 필요
uname -r | awk -F. '{print $1"."$2}'