🇰🇷 한글 설명
Linux 커널의 FPGA DFL 드라이버에서 DMA 매핑 길이를 검증하지 않아 발생하는 취약점입니다. 사용자가 ioctl을 통해 매우 큰 64비트 길이를 전달할 경우, 페이지 수가 정수형(int)으로 변환되는 과정에서 암시적 절단(truncation)이 발생하여 메모리 관리 오류를 유발할 수 있습니다.
💡 쉬운 설명
컴퓨터의 특수 부품(FPGA)을 제어할 때 데이터 크기를 제대로 확인하지 않아 발생하는 문제입니다. 공격자가 아주 큰 숫자를 입력하면 시스템이 계산 착오를 일으켜 보안이 뚫릴 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
fpga: dfl-afu: validate DMA mapping length in afu_dma_map_region()
afu_ioctl_dma_map() accepts a 64-bit length from userspace via
DFL_FPGA_PORT_DMA_MAP ioctl without an upper bound check. The value
is passed to afu_dma_pin_pages() where npages is derived as
length >> PAGE_SHIFT and passed to pin_user_pages_fast() which takes
int nr_pages, causing implicit truncation if length is very large.
Validate map.length at the ioctl entry point before calling
afu_dma_map_region(), rejecting values whose page count exceeds
INT_MAX.
📍 영향받는 시스템
Linux kernel (FPGA DFL driver components)
⚔️ 공격 벡터
로컬 사용자가 DFL_FPGA_PORT_DMA_MAP ioctl을 호출하여 조작된 64비트 길이를 전달
🛡️ 대응 방법
afu_ioctl_dma_map() 진입점에서 매핑 길이가 INT_MAX 페이지를 초과하지 않도록 검증 로직 적용 및 커널 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인