🇰🇷 한글 설명
리눅스 커널의 ovpn 모듈 내 unlock_ovpn() 함수에서 Use-After-Free 취약점이 발견되었습니다. llist_for_each_entry()를 사용하여 리스트를 순회하는 과정에서 참조 카운트가 0이 되어 객체가 해제된 후, 다음 항목을 참조하려 할 때 메모리 오류가 발생합니다.
💡 쉬운 설명
프로그램이 이미 삭제된 메모리 정보를 다시 읽으려고 시도하여 발생하는 오류입니다. 이로 인해 시스템이 충돌하거나 해커가 시스템 권한을 탈취할 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ovpn: fix use after free in unlock_ovpn()
unlock_ovpn() iterates over the release_list using llist_for_each_entry()
and drops the peer reference inside the loop body via ovpn_peer_put().
If this drops the last reference, the peer is eventually freed. However,
llist_for_each_entry() reads peer->release_entry.next in the loop advance
expression, which runs after the body. By that time the peer may have
already been freed, resulting in a use after free when advancing to the
next list entry.
Fix this by using llist_for_each_entry_safe(), which caches the next
pointer before executing the loop body.
📍 영향받는 시스템
Linux Kernel (ovpn 모듈을 사용하는 버전)
⚔️ 공격 벡터
특정 네트워크 연결 해제 시나리오를 유도하여 메모리 오류를 일으키는 방식
🛡️ 대응 방법
리스트 순회 시 안전한 함수인 llist_for_each_entry_safe()를 사용하도록 커널 패치 적용
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 보안 패치가 적용된 최신 버전인지 확인합니다.