🇰🇷 한글 설명
리눅스 커널의 mm/migrate_device 구성 요소에서 swapcache를 해제한 후에도 오래된 매핑 정보가 남아 발생하는 취약점입니다. 이로 인해 잘못된 참조 계산이 발생하여 folio 참조 카운트 오류(BUG)를 유발할 수 있습니다.
💡 쉬운 설명
컴퓨터 메모리를 관리하는 과정에서 이미 삭제된 정보를 계속 사용하려고 시도하여 시스템 오류를 일으키는 문제입니다. 이 오류로 인해 시스템이 불안정해지거나 예상치 못한 동작이 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
mm/migrate_device: clear stale mapping after freeing swapcache
__migrate_device_pages() reads the folio mapping before calling
folio_free_swap(). When folio_free_swap() succeeds, the folio is removed
from the swap cache, but the saved mapping still points to swap_space.
Passing the stale mapping to folio_migrate_mapping() makes it use the
mapped-folio path for a folio that is no longer in swapcache. It can then
operate on swap_space.i_pages with invalid reference accounting,
eventually triggering a folio reference count BUG.
After a successful split, nr still contains the number of pages in the
original large folio, although each resulting page is now a separate
order-0 folio. Reset nr to 1 so each split folio is processed separately,
including its own swapcache removal and mapping lookup.
Refresh the saved mapping after folio_free_swap() so the current folio
state is used during migration.
📍 영향받는 시스템
Linux Kernel (mm/migrate_device 관련 모듈 사용 버전)
⚔️ 공격 벡터
로컬 권한을 가진 공격자가 메모리 관리 프로세스를 조작하여 참조 카운트 오류 유도
🛡️ 대응 방법
리눅스 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 취약점이 해결된 최신 패치 버전인지 확인