🇰🇷 한글 설명
리눅스 커널의 secretmem 모듈에서 folio의 LRU 플래그를 기반으로 보안 메모리를 식별하는 과정에 결함이 발견되었습니다. 이로 인해 특정 상황에서 GUP-fast 작업이 보안 메모리를 잘못 인식하여 접근할 수 있으며, 이는 커널 충돌(Crash)을 유발할 수 있습니다.
💡 쉬운 설명
중요한 비밀 정보를 담고 있는 메모리 영역을 시스템이 제대로 구별하지 못하는 오류가 있습니다. 이 오류를 이용하면 시스템이 갑자기 멈추거나 꺼지는 현상이 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
mm/secretmem: fix GUP-fast succeeding on secretmem folios
folio_is_secretmem() currently relies on secretmem folios being LRU
folios, to save some cycles.
However, folios might reside in a folio batch without the LRU flag set, or
temporarily have their LRU flag cleared. Consequently, the LRU flag is
unreliable for this purpose.
In particular, this is the case when secretmem_fault() allocates a fresh
page and calls filemap_add_folio()->folio_add_lru(). The folio might be
added to the per-cpu folio batch and won't get the LRU flag set until the
batch was drained using e.g., lru_add_drain().
Consequently, folio_is_secretmem() might not detect secretmem folios and
GUP-fast can succeed in grabbing a secretmem folio, crashing the kernel
when we would later try reading/writing to the folio, because the folio
has been unmapped from the directmap.
Fix it by removing that unreliable check.
📍 영향받는 시스템
LRU 플래그 기반의 folio 식별 로직을 사용하는 리눅스 커널 버전
⚔️ 공격 벡터
특정 메모리 할당 및 배치(batch) 처리 과정에서 발생하는 타이밍 이슈를 이용한 커널 메모리 접근
🛡️ 대응 방법
리눅스 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 folio_is_secretmem()의 검증 로직을 수정해야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 최신 패치 버전인지 배포판 보안 공지를 통해 확인합니다.