🇰🇷 한글 설명
Linux 커널의 dw-axi-dmac 드라이버에서 hw_desc 배열 범위를 초과하는 오버런 취약점이 발견되었습니다. 특정 버퍼 설정 시 할당된 디스크립터 수보다 더 많은 데이터를 처리하려 시도하여 커널 패닉을 유발할 수 있습니다.
💡 쉬운 설명
컴퓨터의 데이터 전송 장치가 정해진 메모리 공간보다 더 많은 데이터를 쓰려고 시도하여 시스템이 갑자기 멈추거나 꺼질 수 있는 문제입니다. 특정 설정 조건에서 메모리 관리 오류가 발생하여 시스템 안정성을 해칩니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
Avoid hw_desc array overrun in dw-axi-dmac
I have a use case where nr_buffers = 3 and in which each descriptor is composed by 3
segments, resulting in the DMA channel descs_allocated to be 9. Since axi_desc_put()
handles the hw_desc considering the descs_allocated, this scenario would result in a
kernel panic (hw_desc array will be overrun).
To fix this, the proposal is to add a new member to the axi_dma_desc structure,
where we keep the number of allocated hw_descs (axi_desc_alloc()) and use it in
axi_desc_put() to handle the hw_desc array correctly.
Additionally I propose to remove the axi_chan_start_first_queued() call after completing
the transfer, since it was identified that unbalance can occur (started descriptors can
be interrupted and transfer ignored due to DMA channel not being enabled).
📍 영향받는 시스템
dw-axi-dmac 드라이버를 사용하는 Linux 커널 시스템
⚔️ 공격 벡터
특정 버퍼 및 세그먼트 구성을 유도하여 커널 메모리 오버런을 일으키는 방식
🛡️ 대응 방법
dw-axi-dmac 드라이버의 hw_desc 배열 관리 로직이 수정된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 버전인지 배포판 보안 공지를 통해 확인