🇰🇷 한글 설명
리눅스 커널의 mremap.c에서 old_size가 0인 mremap() 시스템 콜이 move_page_tables()까지 도달하면, 빈 범위에 대해 invalidate_range_start/end를 불필요하게 호출한다. 이로 인해 KVM의 mmu_notifier에서 WARN이 발생하며, 해당 문제는 함수 초기에 조기 반환하도록 수정되었다.
💡 쉬운 설명
사용자 프로그램이 메모리 크기를 0으로 지정해 메모리 재배치를 요청하면, 커널이 아무 작업도 할 필요 없는 데 작업을 시도하며 경고 메시지를 남긴다. 실제 데이터 손상이나 권한 상승은 아니고 불필요한 동작과 경고 발생이 주된 문제이다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
mmmremap.c: avoid pointless invalidate_range_start/end on mremap(old_size=0)
If an mremap() syscall with old_size=0 ends up in move_page_tables(), it
will call invalidate_range_start()/invalidate_range_end() unnecessarily,
i.e. with an empty range.
This causes a WARN in KVM's mmu_notifier. In the past, empty ranges
have been diagnosed to be off-by-one bugs, hence the WARNing. Given the
low (so far) number of unique reports, the benefits of detecting more
buggy callers seem to outweigh the cost of having to fix cases such as
this one, where userspace is doing something silly. In this particular
case, an early return from move_page_tables() is enough to fix the
issue.
📍 영향받는 시스템
수정 이전의 리눅스 커널(KVM 가상화 환경에서 경고 발생 가능)
⚔️ 공격 벡터
로컬 사용자가 old_size=0으로 mremap() 시스템 콜을 호출하여 커널 경고를 유발할 수 있음
🛡️ 대응 방법
패키지 배포판의 보안 업데이트를 적용하거나 수정이 포함된 최신 커널로 업그레이드
🔧 검증 코드
출력된 커널 버전을 배포판의 보안 공지와 대조하여 CVE-2022-49077 수정이 포함된 버전인지 확인 (수정 커널 버전이 아니면 패치 필요)