🇰🇷 한글 설명
Linux 커널의 liquidio 드라이버에서 VF 초기화 중 setup_nic_devices() 함수의 정리 루프에 오프바이원 오류가 발생하여 메모리 누수가 야기된다. 실패한 인덱스 i를 건너뛰는 while(i--) 루프로 인해 동적 할당된 메모리가 제대로 해제되지 않는다. 현재 인덱스부터 0까지 모든 항목을 역순으로 반복하도록 수정하여 메모리 누수를 해결한다.
💡 쉬운 설명
Linux 시스템의 네트워크 드라이버에서 메모리 정리 과정을 건너뛰는 버그로 인해 사용 종료된 메모리가 반환되지 않는다. 로컬 사용자가 반복적으로 장치 초기화를 실패시켜 시스템 메모리를 소진할 수 있다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net: liquidio: Fix off-by-one error in VF setup_nic_devices() cleanup
In setup_nic_devices(), the initialization loop jumps to the label
setup_nic_dev_free on failure. The current cleanup loop while(i--)
skip the failing index i, causing a memory leak.
Fix this by changing the loop to iterate from the current index i
down to 0.
Compile tested only. Issue found using code review.
📍 영향받는 시스템
Cavium liquidio 네트워크 드라이버를 포함한 Linux 커널; VF(Virtual Function) 초기화 기능이 있는 모든 버전
⚔️ 공격 벡터
로컬 접근 필요; 권한 없는 사용자가 sysfs/ioctl을 통해 장치 초기화 실패를 반복 유발
🛡️ 대응 방법
Linux 커널을 최신 패치 버전으로 업그레이드; 커널 소스코드의 setup_nic_devices() 정리 루프 수정
🔧 검증 코드
출력이 있으면 취약한 코드 패턴이 존재함을 의미; 커널 버전을 CVE 패치 공개 날짜와 비교하여 업데이트 필요 여부 판단
grep -n 'while(i--)' /lib/modules/$(uname -r)/source/drivers/net/ethernet/cavium/liquidio/nic_main.c 2>/dev/null | head -1