🇰🇷 한글 설명
Linux 커널의 udmabuf 구성 요소에서 export_udmabuf() 함수 호출 중 오류가 발생할 경우 dma_buf가 적절히 해제되지 않는 메모리 누수 취약점이 발견되었습니다. FD 테이블이 가득 차서 dma_buf_fd()가 실패할 때, 이미 생성된 dma_buf를 정리하지 못해 메모리에 잔류하게 됩니다.
💡 쉬운 설명
시스템이 특정 작업을 하다가 오류가 났을 때, 사용했던 메모리를 제대로 돌려주지 않고 계속 붙잡고 있는 문제입니다. 이 현상이 반복되면 시스템의 메모리가 점점 줄어들어 성능이 떨어지거나 시스템이 멈출 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
udmabuf: fix memory leak on last export_udmabuf() error path
In export_udmabuf(), if dma_buf_fd() fails because the FD table is full, a
dma_buf owning the udmabuf has already been created; but the error handling
in udmabuf_create() will tear down the udmabuf without doing anything about
the containing dma_buf.
This leaves a dma_buf in memory that contains a dangling pointer; though
that doesn't seem to lead to anything bad except a memory leak.
Fix it by moving the dma_buf_fd() call out of export_udmabuf() so that we
can give it different error handling.
Note that the shape of this code changed a lot in commit 5e72b2b41a21
("udmabuf: convert udmabuf driver to use folios"); but the memory leak
seems to have existed since the introduction of udmabuf.
📍 영향받는 시스템
udmabuf 기능이 포함된 Linux 커널 버전 (udmabuf 도입 시점부터 해당 패치 적용 전까지)
⚔️ 공격 벡터
직접적인 공격보다는 시스템 자원(FD)을 고갈시켜 메모리 누수를 유도하는 방식
🛡️ 대응 방법
udmabuf 관련 메모리 누수 수정 사항이 포함된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 최신 패치 버전인지 확인