🇰🇷 한글 설명
Linux 커널의 gve 드라이버에서 shutdown() 호출 이후 ethtool 작업이 실행될 경우 커널 패닉이 발생할 수 있는 취약점입니다. shutdown() 과정에서 내부 데이터 구조가 해제되지만 장치가 여전히 사용자 공간에 노출되어 있어, 해제된 포인터를 참조할 위험이 있습니다. 이를 해결하기 위해 shutdown() 시 netif_device_detach()를 호출하여 장치를 분리하도록 수정되었습니다.
💡 쉬운 설명
컴퓨터를 끌 때 네트워크 장치가 완전히 꺼지기 전에 특정 명령이 전달되면 시스템이 갑자기 멈추거나 충돌할 수 있는 문제입니다. 시스템 종료 과정에서 장치를 미리 '사용 불가' 상태로 표시하여 이런 충돌을 방지할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
gve: prevent ethtool ops after shutdown
A crash can occur if an ethtool operation is invoked
after shutdown() is called.
shutdown() is invoked during system shutdown to stop DMA operations
without performing expensive deallocations. It is discouraged to
unregister the netdev in this path, so the device may still be visible
to userspace and kernel helpers.
In gve, shutdown() tears down most internal data structures. If an
ethtool operation is dispatched after shutdown(), it will dereference
freed or NULL pointers, leading to a kernel panic. While graceful
shutdown normally quiesces userspace before invoking the reboot
syscall, forced shutdowns (as observed on GCP VMs) can still trigger
this path.
Fix by calling netif_device_detach() in shutdown().
This marks the device as detached so the ethtool ioctl handler
will skip dispatching operations to the driver.
📍 영향받는 시스템
gve(Google Virtual Ethernet) 드라이버를 사용하는 Linux 커널 시스템 (특히 GCP VM 환경)
⚔️ 공격 벡터
시스템 종료 과정 중 강제 종료(Forced Shutdown) 상황에서 ethtool ioctl 명령을 유도하여 커널 패닉 유발
🛡️ 대응 방법
gve 드라이버의 shutdown() 함수에 netif_device_detach()가 포함된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 버전인지 배포판 보안 공지를 통해 확인