🇰🇷 한글 설명
Linux 커널의 BPF 구현에서 BPF_F_INNER_MAP로 표시된 맵의 경우, 검증기(verifier)가 템플릿의 max_entries 값을 사용하여 룩업 결과의 null 여부를 잘못 판단하는 취약점입니다. 이로 인해 실제 런타임 맵의 경계 검사가 무시될 수 있어 보안 검증 우회 가능성이 존재합니다.
💡 쉬운 설명
리눅스 운영체제의 핵심 기능 중 하나인 BPF에서 데이터의 범위를 확인하는 과정에 오류가 있는 상태입니다. 공격자가 이 오류를 이용해 허용되지 않은 메모리 영역에 접근할 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
bpf: Keep dynamic inner array lookups nullable
An ARRAY_OF_MAPS can use an array created with BPF_F_INNER_MAP as its
inner map template. A concrete inner array with a different max_entries
value can then replace the template.
After a successful outer map lookup, the verifier represents the
resulting map pointer using the inner map template. Const-key lookup
nullness elision consequently uses the template max_entries even though
the runtime helper uses the concrete inner map max_entries.
Do not elide lookup result nullness for maps marked with BPF_F_INNER_MAP,
because the template max_entries does not prove that the key is in bounds
for the concrete runtime map.
📍 영향받는 시스템
BPF_F_INNER_MAP 기능을 사용하는 Linux Kernel (패치 전 버전)
⚔️ 공격 벡터
조작된 BPF 프로그램을 로드하여 커널 검증기의 경계 검사 로직을 우회하고 메모리 오류를 유도
🛡️ 대응 방법
BPF inner array lookup 시 nullness elision을 방지하도록 수정된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 최신 보안 패치 버전인지 확인