🇰🇷 한글 설명
Linux 커널의 ublk 구성 요소에서 읽기 전용 mmap 요청 시 VM_MAYWRITE 플래그를 적절히 제거하지 않는 취약점이 발견되었습니다. 이로 인해 사용자 공간 데몬이 mprotect()를 사용하여 읽기 전용 매핑을 쓰기 가능 상태로 업그레이드할 수 있으며, 결과적으로 커널이 관리하는 명령 버퍼의 필드를 변조할 수 있습니다.
💡 쉬운 설명
읽기 전용으로 설정된 메모리 영역을 공격자가 권한을 조작하여 쓰기 가능한 상태로 바꿀 수 있는 보안 결함입니다. 이를 통해 시스템의 중요한 명령 데이터를 조작하여 커널의 동작을 방해하거나 오류를 일으킬 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ublk: clear VM_MAYWRITE on read-only ublk char device mmap
ublk_ch_mmap() rejects mmap requests with VM_WRITE set, but never
clears VM_MAYWRITE on the resulting read-only mapping. This allows
a userspace daemon to mmap the per-queue command buffer PROT_READ,
then upgrade it to PROT_WRITE via mprotect(), since VM_MAYWRITE was
never cleared.
The command buffer holds struct ublksrv_io_desc entries that are
kernel-written ABI; a writable mapping lets an unprivileged daemon
process corrupt fields such as addr, op_flags, nr_sectors, and
start_sector.
Same bug class as the drm/panthor and drm/vc4 VM_MAYWRITE fixes, and
the 2026-08-13 ptp/vmclock fix (a5edadbae57e).
Verified via mprotect() PoC: before the fix, a PROT_READ mapping can
be upgraded to PROT_READ|PROT_WRITE and a write into the command
buffer corrupts io_desc fields (confirmed under KASAN). After the
fix, mprotect() returns -EACCES.
📍 영향받는 시스템
ublk 기능을 사용하는 Linux 커널 버전
⚔️ 공격 벡터
mprotect() 시스템 호출을 사용하여 읽기 전용 매핑을 쓰기 가능(PROT_WRITE)으로 업그레이드한 후 명령 버퍼 변조
🛡️ 대응 방법
ublk_ch_mmap() 함수에서 VM_MAYWRITE 플래그를 명확히 제거하는 최신 Linux 커널 패치 적용
🔧 검증 코드
출력된 커널 버전이 ublk 관련 취약점이 수정된 최신 보안 패치 버전인지 확인하십시오.