🇰🇷 한글 설명
Linux 커널의 drm/panthor 드라이버에서 가상 메모리(VM) 생성 시 커널 버퍼 객체(KBO) 범위와 사용자 매핑 범위가 겹치는지 확인하지 않는 취약점이 발견되었습니다. 이로 인해 사용자 공간의 매핑이 커널 영역을 침범할 수 있는 위험이 있었으나, vm_bind 시 범위 중첩 및 64비트 정수 오버플로우를 확인하는 로직을 추가하여 해결되었습니다.
💡 쉬운 설명
컴퓨터의 메모리를 나누어 쓸 때, 사용자가 접근해서는 안 되는 중요한 시스템 영역을 건드릴 수 있는 허점이 있었습니다. 이제는 사용자가 메모리를 요청할 때 시스템 영역과 겹치는지 미리 검사하여 이를 방지합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
drm/panthor: Add vm_bind region with kbo range overlap check
When a VM is created, caller has to specify the range of the address space
carve-out set aside for mapping kernel BO's. That means vm_bind mappings of
UM-exposed BO's should not intersect with that region, but at the moment
we're not checking this.
At first, I thought of giving these values to drm_gpuvm_init() through its
reserve_{offset, range} arguments, but it turns out that is meant for VM
address spans that are not managed through the usual drm_gpuvm split/merge
circuit, so storing the end of the user VA range at VM creation time and
doing a quick check in the vm_bind ioctl path was the simplest workaround.
The new check also makes sure vm_bind range doesn't overflow the size of a
64-bit unsigned integer. That was already being done further down the call
stack inside drm_gpuvm_sm_map -> drm_gpuvm_range_valid, but it's best to
fail early in the driver before GPUVM functions are invoked so that we
won't waste time allocating vm_bind context resources.
📍 영향받는 시스템
Linux kernel (drm/panthor driver 포함 버전)
⚔️ 공격 벡터
사용자 공간에서 악의적으로 조작된 vm_bind ioctl 호출을 통해 커널 메모리 영역에 접근 시도
🛡️ 대응 방법
panthor 드라이버의 vm_bind 범위 검사 로직이 포함된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 panthor 드라이버의 취약점 패치가 적용된 최신 버전인지 확인