🇰🇷 한글 설명
Linux 커널의 mm/percpu-km 구성 요소에서 pcpu_create_chunk() 함수 호출 시 비트맵 오버플로 및 계정 오류가 발생하는 취약점입니다. nr_units가 1보다 클 경우 chunk->populated 비트맵 범위를 벗어나 데이터를 기록하게 되어 메모리 오염을 유발할 수 있습니다.
💡 쉬운 설명
컴퓨터의 메모리를 관리하는 과정에서 기록할 공간보다 더 많은 데이터를 쓰려고 시도하여 시스템 오류를 일으킬 수 있는 문제입니다. 이로 인해 시스템이 불안정해지거나 보안 문제가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
mm/percpu-km: fix bitmap overflow and accounting in pcpu_create_chunk()
In pcpu_create_chunk(), nr_pages is the total contiguous backing
allocation, i.e., nr_units * pcpu_unit_pages, but pcpu_chunk_populated()
uses it to set chunk->populated, whose size is pcpu_unit_pages, bitmap.
Since bit N in chunk->populated means page offset N inside every unit is
backed. When nr_units > 1, the function writes beyond chunk->populated.
Fix it by using chunk->nr_pages.
It also fixes the global pcpu_nr_empty_pop_pages accounting, since
pcpu_balance_free() only iterates up to chunk->nr_pages.
Commit a63d4ac4ab609 ("percpu: make percpu-km set chunk->populated bitmap
properly") introduced the bitmap overflow issue. Later, commit
b539b87fed37f ("percpu: implmeent pcpu_nr_empty_pop_pages and
chunk->nr_populated") added pcpu_nr_empty_pop_pages and caused the
accounting issue.
📍 영향받는 시스템
Linux kernel (commit a63d4ac4ab609 및 b539b87fed37f가 포함된 버전)
⚔️ 공격 벡터
로컬 권한을 가진 공격자가 특정 percpu-km 할당을 유도하여 메모리 오버플로를 발생시킴
🛡️ 대응 방법
해당 취약점이 수정된 최신 Linux 커널 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 취약점이 해결된 패치 버전 이후인지 확인