🇰🇷 한글 설명
Linux 커널의 dmaengine 구성 요소에서 dma_chan_put() 함수 호출 시 장치 참조 횟수(kref)가 부적절하게 감소하는 언더플로우 취약점이 발견되었습니다. 이로 인해 실제 장치가 사용 중임에도 불구하고 참조 횟수가 0이 되어 dma_find_channel()이 NULL을 반환하는 문제가 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터 부품을 관리하는 카운터 숫자가 실제 사용량보다 더 빨리 줄어드는 오류입니다. 이 오류로 인해 사용 중인 장치가 갑자기 사라진 것처럼 인식되어 시스템 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
dmaengine: Fix device kref underflow in dma_chan_put()
dma_chan_get() takes chan->device->ref only on the slow path:
/* no kref on fast path */
if (chan->client_count) {
__module_get(owner);
chan->client_count++;
return 0;
}
if (!try_module_get(owner))
return -ENODEV;
if (!dma_device_get(chan->device)) { // calls kref_get_unless_zero()
dma_chan_put() drops the ref unconditionally, so every fast-path
get/put pair drops one extra device reference.
The bug fires when two conditions hold together: a non-private
provider has a persistent client holding chan->client_count > 0
and another client cycles dmaengine_get()/dmaengine_put().
When the kref hits zero, the subsequent dma_find_channel() returns
NULL even though the provider module is still loaded.
Fix this by dropping device->ref only on the last put, matching the
single slow-path get.
📍 영향받는 시스템
Linux Kernel (dmaengine 구성 요소 포함 버전)
⚔️ 공격 벡터
로컬 공격자가 특정 DMA 채널 사용 패턴을 유도하여 장치 참조 카운트를 조작함으로써 서비스 거부(DoS) 유발 가능
🛡️ 대응 방법
dmaengine 관련 패치가 적용된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인