🇰🇷 한글 설명
Linux 커널의 Rust Binder에서 VMA(가상 메모리 영역) 소유권을 검증하지 않는 버그입니다. 공격자가 VMA를 조작하여 잘못된 VMA에 페이지를 설치하면, 일반적으로 읽기 전용인 Binder 페이지에 쓰기가 가능해질 수 있습니다.
💡 쉬운 설명
리눅스 커널의 메모리 관리 부분에서 보안 확인이 부족해서, 공격자가 메모리 영역을 변경하면 보호된 영역에 접근할 수 있는 문제입니다. 로컬 권한이 필요한 공격입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
rust_binder: check ownership before using vma
When installing missing pages (or zapping them), Rust Binder will look
up the vma in the mm by address, and then call vm_insert_page (or
zap_page_range_single). However, if the vma is closed and replaced with
a different vma at the same address, this can lead to Rust Binder
installing pages into the wrong vma.
By installing the page into a writable vma, it becomes possible to write
to your own binder pages, which are normally read-only. Although you're
not supposed to be able to write to those pages, the intent behind the
design of Rust Binder is that even if you get that ability, it should not
lead to anything bad. Unfortunately, due to another bug, that is not the
case.
To fix this, store a pointer in vm_private_data and check that the vma
returned by vma_lookup() has the right vm_ops and vm_private_data before
trying to use the vma. This should ensure that Rust Binder will refuse
to interact with any other VMA. The plan is to introduce more vma
abstractions to avoid this unsafe access to vm_ops and vm_private_data,
but for now let's start with the simplest possible fix.
C Binder performs the same check in a slightly different way: it
provides a vm_ops->close that sets a boolean to true, then checks that
boolean after calling vma_lookup(), but this is more fragile
than the solution in this patch. (We probably still want to do both, but
the vm_ops->close callback will be added later as part of the follow-up
vma API changes.)
It's still possible to remap the vma so that pages appear in the right
vma, but at the wrong offset, but this is a separate issue and will be
fixed when Rust Binder gets a vm_ops->close callback.
📍 영향받는 시스템
Linux kernel 6.x 버전 (Rust Binder 포함된 시스템)
⚔️ 공격 벡터
로컬 공격자가 VMA 주소 재할당을 통해 Binder 페이지의 쓰기 보호를 우회
🛡️ 대응 방법
Linux 커널을 최신 버전으로 업데이트하여 vm_private_data 검증 로직이 포함된 패치 적용
🔧 검증 코드
binder 모듈이 로드되어 있으면 시스템이 영향 범위에 있으며, uname -r로 커널 버전을 확인하고 보안 공지를 통해 패치 여부 확인 필요
lsmod | grep -i binder || echo 'Binder module not loaded'