🇰🇷 한글 설명
Linux 커널의 PHY LED 트리거 코드에서 메모리 누수가 발견되었습니다. devm API를 잘못 사용하여 PHY 장치가 분리되어도 할당된 메모리가 해제되지 않으며, 네트워크 재시작 반복 시 메모리 부족을 유발합니다. 수정은 devm 할당을 kzalloc/kcalloc으로 교체하고 unregister 경로에 kfree를 추가하는 것입니다.
💡 쉬운 설명
네트워크 장치의 LED 표시 기능에서 사용하는 메모리가 제대로 반환되지 않는 결함입니다. 네트워크를 여러 번 재시작하면 누적되어 시스템 메모리가 고갈될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net: phy: leds: fix memory leak
A network restart test on a router led to an out-of-memory condition,
which was traced to a memory leak in the PHY LED trigger code.
The root cause is misuse of the devm API. The registration function
(phy_led_triggers_register) is called from phy_attach_direct, not
phy_probe, and the unregister function (phy_led_triggers_unregister)
is called from phy_detach, not phy_remove. This means the register and
unregister functions can be called multiple times for the same PHY
device, but devm-allocated memory is not freed until the driver is
unbound.
This also prevents kmemleak from detecting the leak, as the devm API
internally stores the allocated pointer.
Fix this by replacing devm_kzalloc/devm_kcalloc with standard
kzalloc/kcalloc, and add the corresponding kfree calls in the unregister
path.
📍 영향받는 시스템
메모리 누수가 수정되기 전의 Linux 커널 (PHY LED 트리거 코드를 포함하는 버전)
⚔️ 공격 벡터
직접적인 원격 공격 경로는 명확하지 않으며, 네트워크 인터페이스를 반복적으로 재시작하는 상황에서 서비스 거부(메모리 고갈)를 유발할 수 있습니다.
🛡️ 대응 방법
커널을 메모리 누수 수정이 포함된 최신 안정 버전으로 업데이트하고 재부팅하세요.
🔧 검증 코드
출력된 커널 버전을 배포판의 보안 공지나 커널 changelog에서 CVE-2025-37989 수정 포함 여부로 확인하며, 해당 수정이 포함된 패치 버전 이상이면 안전합니다.