🇰🇷 한글 설명
Linux 커널의 ALSA us122l 드라이버에서 읽기 전용 매핑에 대해 VM_MAYWRITE 권한이 유지되는 취약점이 발견되었습니다. 공격자가 mprotect()를 사용하여 읽기 전용 매핑을 쓰기 가능하게 업그레이드할 경우, 할당된 범위를 벗어난 메모리 영역에 접근하거나 잘못된 페이지를 해제할 수 있습니다.
💡 쉬운 설명
컴퓨터의 소리 장치 드라이버에서 읽기 전용으로 설정된 메모리 영역을 몰래 수정할 수 있는 허점이 발견되었습니다. 이를 통해 공격자가 허용되지 않은 메모리 공간을 건드리거나 시스템을 불안정하게 만들 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ALSA: us122l: Prevent write upgrades for read mappings
The hwdep mmap callback rejects read-buffer mappings that are initially
writable, but leaves VM_MAYWRITE set on mappings created with PROT_READ.
A process that can open the hwdep node O_RDWR can later use mprotect() to
make the mapping writable.
The read allocation begins with struct usb_stream. Its read_size member is
used by the fault handler to decide which pages belong to the read buffer.
The read VMA intentionally remains expandable because pcm_usb_stream uses
mremap() after reading that size. Changing read_size first can therefore
map and access pages beyond the allocation. The same member is also
consumed by usb_stream_free(), where changing it can make
free_pages_exact() release pages outside the allocation.
Clear VM_MAYWRITE for read-buffer mappings after rejecting an initially
writable VMA. This keeps the separate output-buffer mapping writable while
preventing later permission upgrades.
📍 영향받는 시스템
Linux kernel (ALSA us122l driver component)
⚔️ 공격 벡터
hwdep 노드를 O_RDWR로 열 수 있는 프로세스가 mprotect()를 호출하여 읽기 매핑의 권한을 쓰기로 승격
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 읽기 버퍼 매핑 시 VM_MAYWRITE 플래그를 제거
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인