🇰🇷 한글 설명
Linux kernel xfrm 모듈의 xfrm_migrate_policy_find() 함수에서 xfrm_pol_hold_rcu() 함수가 중복 호출되어 발생하는 참조 카운트 누수 취약점. 메모리가 제대로 해제되지 않아 메모리 누수를 야기하며, Syzkaller를 통해 발견되었고 중복 호출을 제거하여 수정됨.
💡 쉬운 설명
Linux 시스템의 IPsec 보안 기능에서 메모리 정리 실수로 인해 메모리가 계속 누적되는 문제입니다. 오래 실행되면 시스템의 메모리가 부족해져 성능 저하나 서비스 중단이 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
xfrm: fix refcount leak in xfrm_migrate_policy_find
syzkaller reported a memory leak in xfrm_policy_alloc:
BUG: memory leak
unreferenced object 0xffff888114d79000 (size 1024):
comm "syz.1.17", pid 931
...
xfrm_policy_alloc+0xb3/0x4b0 net/xfrm/xfrm_policy.c:432
The root cause is a double call to xfrm_pol_hold_rcu() in
xfrm_migrate_policy_find(). The lookup function already returns
a policy with held reference, making the second call redundant.
Remove the redundant xfrm_pol_hold_rcu() call to fix the refcount
imbalance and prevent the memory leak.
Found by Linux Verification Center (linuxtesting.org) with Syzkaller.
📍 영향받는 시스템
Linux kernel 모든 버전 (xfrm_migrate_policy_find 함수 포함)
⚔️ 공격 벡터
로컬 사용자가 IPsec 정책 마이그레이션 기능을 반복 호출하여 메모리 누수 유발
🛡️ 대응 방법
Linux kernel을 최신 보안 패치가 적용된 버전으로 업그레이드
🔧 검증 코드
패치된 버전은 중복 호출이 제거되어 낮은 수 (1회)로 나타나야 하고, 취약한 버전은 중복되어 높은 수 (2회 이상)로 나타남
grep -c 'xfrm_pol_hold_rcu' /usr/src/linux/net/xfrm/xfrm_policy.c 2>/dev/null