🇰🇷 한글 설명
Linux 커널의 bpf cgroup_storage_get_next_key() 함수에서 리스트의 끝을 감지하는 로직에 오류가 있습니다. 이로 인해 마지막 요소 이후에 NULL을 반환하지 않고 잘못된 포인터를 참조하여 내부 맵 필드 데이터를 사용자 공간으로 유출할 수 있습니다.
💡 쉬운 설명
컴퓨터의 메모리 목록을 읽을 때 마지막 항목을 확인하는 과정에서 실수가 발생했습니다. 이 실수 때문에 목록에 없는 잘못된 정보를 읽어와서 중요한 데이터가 외부로 새 나갈 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
bpf: fix end-of-list detection in cgroup_storage_get_next_key()
list_next_entry() never returns NULL -- when the current element is the
last entry it wraps to the list head via container_of(). The subsequent
NULL check is therefore dead code and get_next_key() never returns
-ENOENT for the last element, instead reading storage->key from a bogus
pointer that aliases internal map fields and copying the result to
userspace.
Replace it with list_entry_is_head() so the function correctly returns
-ENOENT when there are no more entries.
📍 영향받는 시스템
Linux kernel (bpf cgroup_storage 관련 기능이 활성화된 시스템)
⚔️ 공격 벡터
로컬 공격자가 bpf 시스템 호출을 통해 커널 메모리의 내부 데이터를 읽어내는 방식
🛡️ 대응 방법
리스트 끝 감지 로직이 수정된 최신 Linux 커널 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 배포판의 보안 업데이트 버전인지 확인