🇰🇷 한글 설명
Linux 커널의 accel/ethosu 구성 요소에서 dma_length() 함수 내 산술 연산 오류가 발견되었습니다. 부호 있는 정수 언더플로우, 곱셈 오버플로우 및 오프셋 합산 시 오버플로우가 발생할 수 있으며, 이로 인해 DMA 영역 크기가 잘못 계산될 수 있습니다. 결과적으로 잘못된 영역 크기 보고로 인해 GEM 버퍼 크기 검증을 우회할 수 있는 보안 취약점이 존재합니다.
💡 쉬운 설명
컴퓨터가 데이터를 처리할 때 계산 과정에서 숫자가 너무 커지거나 작아져서 발생하는 오류입니다. 이 오류를 이용하면 시스템이 허용하지 않는 메모리 영역에 몰래 접근할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
accel/ethosu: fix arithmetic issues in dma_length()
dma_length() derives DMA region usage from command stream values and
updates region_size[]:
len = ((len + stride[0]) * size0 + stride[1]) * size1
region_size[region] = max(..., len + dma->offset)
Several arithmetic issues can corrupt the derived region size:
- signed stride values may underflow when added to len
- intermediate multiplications may overflow
- len + dma->offset may overflow during region_size updates
- dma_length() error returns were not validated by the caller
region_size[] is later used by ethosu_job.c to validate command stream
accesses against GEM buffer sizes. Arithmetic wraparound can therefore
under-report region usage and bypass the bounds validation.
Fix by validating signed additions, using overflow helpers for
multiplications and offset updates, and propagating dma_length()
failures to the caller.
📍 영향받는 시스템
Linux kernel (accel/ethosu 드라이버 포함 버전)
⚔️ 공격 벡터
조작된 커맨드 스트림 값을 전달하여 산술 오버플로우를 유도하고 메모리 경계 검증을 우회함
🛡️ 대응 방법
커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 산술 연산 검증 로직을 적용함
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 취약점이 해결된 패치 버전인지 확인합니다.