🇰🇷 한글 설명
Linux 커널의 ethtool PHY 드라이버에서 PHY 드라이버가 언바인드된 후에도 장치가 연결된 상태로 남아 있어 NULL 포인터 역참조가 발생하는 취약점입니다. sysfs를 통해 드라이버를 해제한 후 ETHTOOL_MSG_PHY_GET 요청을 보내면 커널 패닉(oops)이 발생할 수 있습니다.
💡 쉬운 설명
네트워크 장치 드라이버를 강제로 연결 해제한 상태에서 특정 정보를 요청하면 컴퓨터 시스템이 갑자기 멈추거나 오류가 발생할 수 있는 문제입니다. 드라이버가 없는 상태에서 정보를 읽으려다 발생하는 소프트웨어 오류입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net: ethtool: phy: avoid NULL deref when PHY driver is unbound
phydev->drv can become NULL while the phy_device is still attached to
its net_device, namely after the PHY driver is unbound via sysfs:
echo <mdio_id> > /sys/bus/mdio_bus/drivers/<phy_drv>/unbind
phy_remove() clears phydev->drv but doesn't call phy_detach(), so the
phy_device stays in the link topology xarray and ethnl_req_get_phydev()
still hands it back. ETHTOOL_MSG_PHY_GET then oopses on:
rep_data->drvname = kstrdup(phydev->drv->name, GFP_KERNEL);
drvname is already treated as optional by phy_reply_size(),
phy_fill_reply() and phy_cleanup_data(), so just skip the allocation
when there is no driver bound.
📍 영향받는 시스템
Linux Kernel (ethtool/phy 관련 모듈 사용 시스템)
⚔️ 공격 벡터
로컬 권한을 가진 사용자가 sysfs를 통해 PHY 드라이버를 언바인드한 후 ethtool 명령어를 실행하여 커널 오류 유도
🛡️ 대응 방법
해당 취약점이 수정된 최신 버전의 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 배포판의 보안 업데이트 버전인지 확인