🇰🇷 한글 설명
Linux 커널의 RDMA/bnxt_re 드라이버에서 DBR/toggle 페이지를 mmap할 때 VM_MAYWRITE 플래그가 제대로 제거되지 않는 취약점이 발견되었습니다. 이로 인해 읽기 전용 매핑이 생성되더라도 mprotect를 통해 나중에 쓰기 권한으로 업그레이드될 수 있어, 초기 mmap 시점의 쓰기 권한 검사를 우회할 수 있습니다.
💡 쉬운 설명
특정 하드웨어 제어용 메모리 영역에 대해 읽기 전용으로 접근 권한을 설정하더라도, 나중에 몰래 쓰기 권한을 얻어낼 수 있는 보안 허점이 있었습니다. 이 취약점을 통해 공격자가 허용되지 않은 메모리 영역에 데이터를 쓸 가능성이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
RDMA/bnxt_re: Clear VM_MAYWRITE on DBR/toggle page mmap
bnxt_re_mmap() rejects VM_WRITE for the DBR_PAGE and TOGGLE_PAGE mmap
flags, but a read-only mapping can still retain VM_MAYWRITE. nd later
be upgraded with mprotect(PROT_WRITE). This can bypass the write check
that only runs at mmap time.
Clear VM_MAYWRITE before vm_insert_page() in the shared DBR/toggle-page
branch, matching the existing policy that userspace writes are not
expected for these pages.
📍 영향받는 시스템
Linux kernel (bnxt_re driver 사용 시스템)
⚔️ 공격 벡터
mmap으로 읽기 전용 매핑을 생성한 후 mprotect를 사용하여 쓰기 권한을 획득하는 방식
🛡️ 대응 방법
vm_insert_page() 호출 전 VM_MAYWRITE 플래그를 명시적으로 제거하도록 커널 패치 적용
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 최신 패치 버전인지 확인