🔍 CVE-2025-40256

0.0
CVSS Score
UNKNOWN
2025-12-04
2026-10-19 19:10
✅ 완료

🇰🇷 한글 설명

Linux 커널의 xfrm 구성 요소에서 상태 생성 중 오류가 발생할 경우, 생성된 IPcomp 터널이 적절히 삭제되지 않아 리소스가 누수되는 취약점입니다. 이 문제는 상태가 리스트에 추가되기 전 초기화 단계에서 실패할 때 발생하며, 이를 해결하기 위해 xfrm_state_gc_destroy 시점에 터널 삭제를 호출하도록 수정되었습니다.

💡 쉬운 설명

네트워크 보안 연결을 설정하다가 중간에 오류가 나면, 사용되지 않는 연결 통로가 메모리에 계속 남아있는 현상입니다. 이로 인해 시스템의 자원이 조금씩 낭비될 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: xfrm: also call xfrm_state_delete_tunnel at destroy time for states that were never added In commit b441cf3f8c4b ("xfrm: delete x->tunnel as we delete x"), I missed the case where state creation fails between full initialization (->init_state has been called) and being inserted on the lists. In this situation, ->init_state has been called, so for IPcomp tunnels, the fallback tunnel has been created and added onto the lists, but the user state never gets added, because we fail before that. The user state doesn't go through __xfrm_state_delete, so we don't call xfrm_state_delete_tunnel for those states, and we end up leaking the FB tunnel. There are several codepaths affected by this: the add/update paths, in both net/key and xfrm, and the migrate code (xfrm_migrate, xfrm_state_migrate). A "proper" rollback of the init_state work would probably be doable in the add/update code, but for migrate it gets more complicated as multiple states may be involved. At some point, the new (not-inserted) state will be destroyed, so call xfrm_state_delete_tunnel during xfrm_state_gc_destroy. Most states will have their fallback tunnel cleaned up during __xfrm_state_delete, which solves the issue that b441cf3f8c4b (and other patches before it) aimed at. All states (including FB tunnels) will be removed from the lists once xfrm_state_fini has called flush_work(&xfrm_state_gc_work).

📍 영향받는 시스템

Linux Kernel (xfrm 및 net/key 관련 모듈을 사용하는 시스템)

⚔️ 공격 벡터

직접적인 공격보다는 특정 네트워크 상태 생성/업데이트/이동 과정을 반복하여 자원 누수를 유도하는 방식

🛡️ 대응 방법

해당 수정 사항(commit b441cf3f8c4b 관련 패치)이 적용된 최신 Linux 커널로 업데이트

🔧 검증 코드

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

Shell / Script
uname -r

💻 영향받는 소프트웨어

Linux Kernel