🇰🇷 한글 설명
Linux 커널의 IPv4 스택에서 nexthop 객체가 삭제될 때 에러 경로(error routes)가 제대로 플러시되지 않아 참조 카운트 누수가 발생하는 취약점입니다. 이로 인해 nexthop 객체와 관련 네트워크 장치가 메모리에서 해제되지 않고 계속 점유되는 문제가 발생합니다.
💡 쉬운 설명
네트워크 설정 중 특정 경로를 삭제할 때, 연결된 정보가 완전히 지워지지 않고 메모리에 찌꺼기로 남는 현상입니다. 이 현상이 반복되면 시스템 자원이 낭비되어 장치를 삭제할 수 없는 상태가 될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ipv4: Fix reference count leak when using error routes with nexthop objects
When a nexthop object is deleted, it is marked as dead and then
fib_table_flush() is called to flush all the routes that are using the
dead nexthop.
The current logic in fib_table_flush() is to only flush error routes
(e.g., blackhole) when it is called as part of network namespace
dismantle (i.e., with flush_all=true). Therefore, error routes are not
flushed when their nexthop object is deleted:
# ip link add name dummy1 up type dummy
# ip nexthop add id 1 dev dummy1
# ip route add 198.51.100.1/32 nhid 1
# ip route add blackhole 198.51.100.2/32 nhid 1
# ip nexthop del id 1
# ip route show
blackhole 198.51.100.2 nhid 1 dev dummy1
As such, they keep holding a reference on the nexthop object which in
turn holds a reference on the nexthop device, resulting in a reference
count leak:
# ip link del dev dummy1
[ 70.516258] unregister_netdevice: waiting for dummy1 to become free. Usage count = 2
Fix by flushing error routes when their nexthop is marked as dead.
IPv6 does not suffer from this problem.
📍 영향받는 시스템
Linux Kernel (IPv4를 사용하는 모든 시스템)
⚔️ 공격 벡터
로컬 사용자가 네트워크 경로(nexthop)를 생성하고 삭제하는 조작을 통해 자원 누수를 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인