🔍 CVE-2021-47555

7.8
CVSS Score
HIGH
2024-05-24
2026-08-04 10:17
✅ 완료

🇰🇷 한글 설명

리눅스 커널의 VLAN 네트워킹 서브시스템에서 real_dev의 참조 카운트(refcnt) 언더플로우가 발생하는 취약점입니다. VLAN 장치를 등록하는 과정에서 참조 카운트를 증가시키는 dev_hold()가 적절히 호출되지 않아, 장치 삭제 시 카운트가 음수로 떨어지며 메모리 누수 및 무한 루프를 유발합니다.

💡 쉬운 설명

네트워크 장치를 만들고 지울 때 컴퓨터가 장치를 사용 중인지 체크하는 숫자가 잘못 계산되는 문제입니다. 이로 인해 시스템이 멈추거나 메모리가 낭비되는 문제가 발생할 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: net: vlan: fix underflow for the real_dev refcnt Inject error before dev_hold(real_dev) in register_vlan_dev(), and execute the following testcase: ip link add dev dummy1 type dummy ip link add name dummy1.100 link dummy1 type vlan id 100 ip link del dev dummy1 When the dummy netdevice is removed, we will get a WARNING as following: ======================================================================= refcount_t: decrement hit 0; leaking memory. WARNING: CPU: 2 PID: 0 at lib/refcount.c:31 refcount_warn_saturate+0xbf/0x1e0 and an endless loop of: ======================================================================= unregister_netdevice: waiting for dummy1 to become free. Usage count = -1073741824 That is because dev_put(real_dev) in vlan_dev_free() be called without dev_hold(real_dev) in register_vlan_dev(). It makes the refcnt of real_dev underflow. Move the dev_hold(real_dev) to vlan_dev_init() which is the call-back of ndo_init(). That makes dev_hold() and dev_put() for vlan's real_dev symmetrical.

📍 영향받는 시스템

VLAN 기능을 사용하는 취약한 버전의 Linux Kernel

⚔️ 공격 벡터

특정 순서로 VLAN 인터페이스를 생성하고 삭제하는 네트워크 설정 조작을 통해 트리거

🛡️ 대응 방법

리눅스 커널을 최신 보안 패치가 적용된 버전으로 업데이트

🔧 검증 코드

출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인

Shell / Script
uname -r

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

💻 영향받는 소프트웨어

Linux Kernel