🔍 CVE-2026-31579

5.5
CVSS Score
MEDIUM
2026-04-24
2026-11-05 22:18
✅ 완료

🇰🇷 한글 설명

Linux 커널의 WireGuard 구현에서 네트워크 네임스페이스 종료 시 rtnl_lock을 수동으로 획득하는 과정에서 데드락(Hung Task)이 발생할 수 있는 취약점입니다. 이를 해결하기 위해 수동 잠금 대신 프레임워크에서 제공하는 exit_rtnl 콜백을 사용하도록 수정되었습니다.

💡 쉬운 설명

네트워크 설정을 정리하는 과정에서 시스템이 서로의 자원을 기다리며 멈춰버리는 현상이 발생할 수 있습니다. 이 문제는 시스템이 응답하지 않는 상태를 유발할 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: wireguard: device: use exit_rtnl callback instead of manual rtnl_lock in pre_exit wg_netns_pre_exit() manually acquires rtnl_lock() inside the pernet .pre_exit callback. This causes a hung task when another thread holds rtnl_mutex - the cleanup_net workqueue (or the setup_net failure rollback path) blocks indefinitely in wg_netns_pre_exit() waiting to acquire the lock. Convert to .exit_rtnl, introduced in commit 7a60d91c690b ("net: Add ->exit_rtnl() hook to struct pernet_operations."), where the framework already holds RTNL and batches all callbacks under a single rtnl_lock()/rtnl_unlock() pair, eliminating the contention window. The rcu_assign_pointer(wg->creating_net, NULL) is safe to move from .pre_exit to .exit_rtnl (which runs after synchronize_rcu()) because all RCU readers of creating_net either use maybe_get_net() - which returns NULL for a dying namespace with zero refcount - or access net->user_ns which remains valid throughout the entire ops_undo_list sequence. [ Jason: added __net_exit and __read_mostly annotations that were missing. ]

📍 영향받는 시스템

WireGuard 모듈을 사용하는 Linux 커널 버전

⚔️ 공격 벡터

네트워크 네임스페이스를 빈번하게 생성하고 삭제하는 동작을 통해 시스템 교착 상태 유발 가능

🛡️ 대응 방법

WireGuard 패치가 적용된 최신 Linux 커널로 업데이트

🔧 검증 코드

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

Shell / Script
uname -r

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Linux Kernel