🇰🇷 한글 설명
리눅스 커널의 zram 구성 요소에서 read_block_state() 함수가 dev_lock을 획득하기 전에 nr_pages를 계산하여 발생하는 경계 외 접근(out-of-bounds access) 취약점입니다. 장치가 재설정되어 크기가 작아질 경우, 이전 테이블 크기를 기준으로 루프를 실행하여 할당된 범위를 벗어난 메모리에 접근할 수 있습니다.
💡 쉬운 설명
컴퓨터의 가상 메모리 관리 기능에서 데이터 크기를 잘못 계산하여 허용되지 않은 메모리 영역을 건드리는 오류입니다. 이로 인해 시스템이 불안정해지거나 보안 문제가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
zram: fix out-of-bounds access in read_block_state()
read_block_state() calculates nr_pages before taking dev_lock. If the
device is reset and reinitialized with a smaller disksize before lock
acquisition, nr_pages still describes the old table. The subsequent loop
can then call slot_lock() past the end of the newly allocated table.
Read disksize after acquiring dev_lock and checking that the device is
initialized. The read lock then keeps the table and its bound stable for
the duration of the scan.
📍 영향받는 시스템
zram 모듈을 사용하는 Linux Kernel 버전
⚔️ 공격 벡터
장치 재설정 및 크기 변경을 유도하여 메모리 경계 외 접근 유발
🛡️ 대응 방법
dev_lock 획득 후 disksize를 읽도록 커널 패치 적용
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전인지 확인