🇰🇷 한글 설명
리눅스 커널의 cpcap-battery 드라이버에서 nvmem_device_put() 호출이 누락되어 참조 누수가 발생하는 취약점이 해결되었습니다. cpcap_battery_detect_battery_type() 함수 내에서 성공 또는 읽기 실패 경로 시 nvmem 장치 참조를 해제하지 않아 메모리 누수가 발생합니다. 이로 인해 드라이버의 재시도 로직이 작동할 경우 nvmem 장치가 영구적으로 해제되지 않을 수 있습니다.
💡 쉬운 설명
배터리 정보를 읽어오는 과정에서 시스템이 사용한 메모리 자원을 제대로 반환하지 않는 버그가 발견되었습니다. 이 문제가 반복되면 시스템의 메모리가 조금씩 낭비되어 성능 저하나 불안정함을 초래할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
power: supply: cpcap-battery: Fix missing nvmem_device_put() causing reference leak
In cpcap_battery_detect_battery_type(), the reference to an nvmem
device obtained via nvmem_device_find() is not released with
nvmem_device_put() on the success or read-failure paths, causing a
permanent reference leak. The driver’s retry logic on subsequent
battery property reads can compound this leak, preventing the nvmem
device from ever being freed.
Found by code review.
📍 영향받는 시스템
cpcap-battery 드라이버를 사용하는 리눅스 커널 시스템
⚔️ 공격 벡터
직접적인 공격은 어려우나, 특정 드라이버 동작을 유도하여 시스템 자원을 고갈시키는 방식의 서비스 거부(DoS) 가능성이 있음
🛡️ 대응 방법
해당 패치가 적용된 최신 리눅스 커널 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인