🇰🇷 한글 설명
리눅스 커널의 안드로이드 Binder 드라이버에서 VMA(가상 메모리 영역) 포인터를 안전하지 않은 방식으로 저장하여 발생하는 취약점입니다. mmap_lock 외부에서 포인터를 저장할 경우, 메모리 해제 후 해당 포인터를 참조하게 되어 Use-After-Free와 같은 메모리 손상 문제가 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터 메모리 주소를 저장할 때, 실제 데이터가 사라진 뒤에도 옛날 주소를 계속 붙잡고 있어 발생하는 오류입니다. 이로 인해 시스템이 불안정해지거나 해커가 메모리에 잘못된 접근을 할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
android: binder: stop saving a pointer to the VMA
Do not record a pointer to a VMA outside of the mmap_lock for later use.
This is unsafe and there are a number of failure paths *after* the
recorded VMA pointer may be freed during setup. There is no callback to
the driver to clear the saved pointer from generic mm code. Furthermore,
the VMA pointer may become stale if any number of VMA operations end up
freeing the VMA so saving it was fragile to being with.
Instead, change the binder_alloc struct to record the start address of the
VMA and use vma_lookup() to get the vma when needed. Add lockdep
mmap_lock checks on updates to the vma pointer to ensure the lock is held
and depend on that lock for synchronization of readers and writers - which
was already the case anyways, so the smp_wmb()/smp_rmb() was not
necessary.
[
[email protected]: fix drivers/android/binder_alloc_selftest.c]
📍 영향받는 시스템
VMA 포인터 저장 방식이 수정되지 않은 이전 버전의 Linux Kernel (Android Binder 드라이버 포함)
⚔️ 공격 벡터
메모리 관리 과정에서 해제된 VMA 포인터를 재사용하는 Use-After-Free 공격
🛡️ 대응 방법
VMA 포인터 대신 시작 주소를 저장하고 vma_lookup()을 사용하도록 커널 패치를 적용하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인하십시오.