🇰🇷 한글 설명
Linux 커널의 ALSA usx2y 드라이버에서 mmap 오프셋 경계 검사가 누락되어 발생하는 취약점입니다. 공격자가 허용되지 않은 오프셋을 사용하여 커널 메모리 페이지에 대한 읽기/쓰기 권한을 획득할 수 있으며, 이는 시스템 충돌이나 권한 상승으로 이어질 수 있습니다.
💡 쉬운 설명
사운드 카드 드라이버가 메모리 주소를 계산할 때 범위를 제대로 확인하지 않아 발생하는 문제입니다. 이를 통해 해커가 컴퓨터의 중요한 핵심 영역(커널 메모리)을 마음대로 조작하거나 시스템을 멈추게 할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ALSA: usx2y: bound the hwdep mmap fault offset
snd_us428ctls_vm_fault() turns the faulting page offset into a kernel
address with no bound of any kind:
offset = vmf->pgoff << PAGE_SHIFT;
vaddr = (char *)(...)->us428ctls_sharedmem + offset;
page = virt_to_page(vaddr);
get_page(page);
vmf->page = page;
return 0;
snd_us428ctls_mmap() checks only the length of the mapping, never the
offset, and us428ctls_sharedmem is a single page from
alloc_pages_exact(). For a character device file_mmap_size_max()
returns ULONG_MAX, so the mm layer imposes no ceiling either. Every page
offset above zero resolves to a struct page outside the object, and the
handler installs it into the caller's address space read-write; the vma
is not marked read-only.
The caller picks the page frame with a single mmap() argument and gets
read-write access to a page of kernel memory it does not own; an offset
that lands in an unpopulated vmemmap region oopses instead.
A process that can open the hwdep node of an attached US-X2Y reaches
this after loading the FPGA image through the same node; no capability
check is involved.
On 7.2.0-rc5 (arm64), mmap() with a large offset:
Unable to handle kernel paging request at virtual address fffffdffc45d5ac8
pc : snd_us428ctls_vm_fault+0x68/0x140 [snd_usb_usx2y]
Call trace:
snd_us428ctls_vm_fault+0x68/0x140 [snd_usb_usx2y]
__do_fault
__handle_mm_fault
handle_mm_fault
el0_da
Reject any offset outside the shared region. The pcm hwdep handler in
usx2yhwdeppcm.c computes its address the same way and needs the same
bound.
Discovered by XBOW, triaged by Baul Lee <
[email protected]>
📍 영향받는 시스템
Linux kernel (ALSA usx2y driver 포함 버전)
⚔️ 공격 벡터
US-X2Y 장치의 hwdep 노드에 접근 가능한 프로세스가 mmap() 호출 시 매우 큰 오프셋 값을 전달하여 공격
🛡️ 대응 방법
커널 업데이트를 통해 usx2y 및 usx2yhwdeppcm 드라이버의 mmap 오프셋 경계 검사 로직을 적용해야 함
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인하십시오.