🇰🇷 한글 설명
Linux 커널의 airoha 드라이버에서 of_reserved_mem_lookup() 함수가 NULL을 반환할 경우 이를 확인하지 않고 참조하여 발생하는 NULL 포인터 역참조 취약점입니다. DTS 설정 오류나 메모리 영역 노드 누락 시 커널 패닉이 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터의 특정 부품이 사용할 메모리 주소를 찾는 과정에서, 주소를 찾지 못했을 때 이를 확인하지 않고 바로 사용하려다 시스템이 멈추는 문제입니다. 설정이 잘못되어 있으면 시스템이 갑자기 꺼지거나 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net: airoha: Add NULL check for of_reserved_mem_lookup() in airoha_qdma_init_hfwd_queues()
of_reserved_mem_lookup() may return NULL if the reserved memory region
referenced by the "memory-region" phandle is not found in the reserved
memory table (e.g. due to a misconfigured DTS or a removed
memory-region node). The current code dereferences the returned
pointer without checking for NULL, leading to a kernel NULL pointer
dereference at the following lines:
dma_addr = rmem->base; // line 1156
num_desc = div_u64(rmem->size, buf_size); // line 1160
Add a NULL check after of_reserved_mem_lookup() and return -ENODEV if
the lookup fails, which is consistent with the existing error handling
for of_parse_phandle() failure in the same code block.
📍 영향받는 시스템
Linux kernel (airoha qdma driver 포함 버전)
⚔️ 공격 벡터
잘못된 장치 트리(DTS) 설정을 통한 로컬 시스템 서비스 거부(DoS)
🛡️ 대응 방법
커널 패치를 적용하여 of_reserved_mem_lookup() 호출 후 NULL 체크 로직을 추가해야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인합니다.