🇰🇷 한글 설명
Linux 커널의 ACRN 드라이버 내 acrn_vm_ram_map() 함수에서 PFNMAP PTE 검사 미흡으로 인한 취약점입니다. PTE 쓰기 권한 미확인, 참조 횟수가 있는 페이지(refcounted pages) 거부 실패, 그리고 연속되지 않은 PFN 범위에 대한 검증 누락이 포함됩니다. 이로 인해 Use-After-Free와 같은 메모리 손상 문제가 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터의 메모리를 관리하는 규칙이 제대로 지켜지지 않아, 허가되지 않은 메모리 영역에 접근하거나 이미 사용 중인 메모리를 잘못 건드릴 수 있는 문제입니다. 이를 통해 시스템이 멈추거나 해커가 시스템 권한을 탈취할 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
drivers/virt/acrn: fix PFNMAP PTE checks in acrn_vm_ram_map()
Patch series "mm: follow_pte() improvements and acrn follow_pte() fixes".
Patch #1 fixes a bunch of issues I spotted in the acrn driver. It
compiles, that's all I know. I'll appreciate some review and testing from
acrn folks.
Patch #2+#3 improve follow_pte(), passing a VMA instead of the MM, adding
more sanity checks, and improving the documentation. Gave it a quick test
on x86-64 using VM_PAT that ends up using follow_pte().
This patch (of 3):
We currently miss handling various cases, resulting in a dangerous
follow_pte() (previously follow_pfn()) usage.
(1) We're not checking PTE write permissions.
Maybe we should simply always require pte_write() like we do for
pin_user_pages_fast(FOLL_WRITE)? Hard to tell, so let's check for
ACRN_MEM_ACCESS_WRITE for now.
(2) We're not rejecting refcounted pages.
As we are not using MMU notifiers, messing with refcounted pages is
dangerous and can result in use-after-free. Let's make sure to reject them.
(3) We are only looking at the first PTE of a bigger range.
We only lookup a single PTE, but memmap->len may span a larger area.
Let's loop over all involved PTEs and make sure the PFN range is
actually contiguous. Reject everything else: it couldn't have worked
either way, and rather made use access PFNs we shouldn't be accessing.
📍 영향받는 시스템
ACRN 드라이버를 사용하는 Linux 커널 버전
⚔️ 공격 벡터
취약한 ACRN 드라이버를 통해 조작된 메모리 매핑 요청을 보내 메모리 오염 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인