🇰🇷 한글 설명
Linux 커널의 IPv6 구현에서 in6_dev_get() 함수가 이미 해제 대기 중인 inet6_dev 객체의 참조 횟수를 부적절하게 증가시켜 발생하는 Use-After-Free 취약점입니다. 이로 인해 객체가 해제된 후에도 메모리에 접근하게 되어 시스템 불안정성이나 권한 상승을 초래할 수 있습니다.
💡 쉬운 설명
컴퓨터가 이미 삭제하기로 결정한 데이터를 실수로 다시 사용하려고 시도하면서 발생하는 오류입니다. 이 과정에서 시스템이 충돌하거나 해커가 시스템 제어권을 얻을 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ipv6: prevent in6_dev_get() from resurrecting inet6_dev
in6_dev_get() reads dev->ip6_ptr under RCU and then unconditionally
increments its refcount. Device teardown can clear the pointer and drop
the last reference between these operations. The increment then
resurrects an object whose RCU free has already been queued, so callers
can use it after it is freed.
Use refcount_inc_not_zero() and return NULL when the object has already
reached zero. RCU keeps the memory accessible through the attempted
reference acquisition, and a successful increment pins the object for
the caller.
An independent run on the exact unpatched 6f5156d7a31a (v7.2-rc3)
kernel reproduced the invalid reference acquisition as UID 1000:
refcount_t: addition on 0; use-after-free.
ip6_mc_source+0xef4/0x17e0
It was followed by the corresponding reference underflow in
ip6_mc_source(). The supplied trace from the same unpatched revision
additionally shows the access after the RCU read-side section ends:
BUG: KASAN: slab-use-after-free in mutex_lock+0x76/0xe0
Write of size 8 at addr ffff888015b50240 by task poc/1219
Bug found and triaged by OpenAI Security Research and
validated by Trail of Bits.
📍 영향받는 시스템
Linux Kernel (v7.2-rc3 및 해당 취약점이 포함된 이전 버전)
⚔️ 공격 벡터
로컬 사용자가 특정 네트워크 장치 해제 시퀀스를 유도하여 메모리 참조 오류를 발생시킴
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 refcount_inc_not_zero() 로직을 적용해야 함
🔧 검증 코드
출력된 커널 버전이 취약점이 해결된 패치 버전 이후인지 확인하십시오.