🇰🇷 한글 설명
Linux 커널의 media: venus: hfi 드라이버에서 펌웨어가 공유 큐의 크기(qsize)를 비정상적으로 크게 조작할 수 있는 취약점이 발견되었습니다. 이로 인해 실제 할당된 공간보다 큰 영역에 데이터를 쓰는 Out-of-Bounds(OOB) Write가 발생할 수 있습니다.
💡 쉬운 설명
하드웨어와 소프트웨어가 데이터를 주고받는 통로의 크기가 잘못 계산되어, 허용된 범위를 벗어난 곳에 데이터를 써버리는 오류입니다. 이로 인해 시스템이 멈추거나 보안 공격에 악용될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
media: venus: hfi: add check to handle incorrect queue size
qsize represents size of shared queued between driver and video
firmware. Firmware can modify this value to an invalid large value. In
such situation, empty_space will be bigger than the space actually
available. Since new_wr_idx is not checked, so the following code will
result in an OOB write.
...
qsize = qhdr->q_size
if (wr_idx >= rd_idx)
empty_space = qsize - (wr_idx - rd_idx)
....
if (new_wr_idx < qsize) {
memcpy(wr_ptr, packet, dwords << 2) --> OOB write
Add check to ensure qsize is within the allocated size while
reading and writing packets into the queue.
📍 영향받는 시스템
Linux kernel (media: venus: hfi driver 포함 버전)
⚔️ 공격 벡터
악의적으로 조작된 값을 가진 펌웨어를 통해 공유 메모리 큐의 크기를 조작하여 발생
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 qsize 검증 로직을 적용해야 함
🔧 검증 코드
출력된 커널 버전이 취약점이 해결된 최신 패치 버전인지 배포판 보안 공지를 통해 확인하십시오.