🇰🇷 한글 설명
Linux 커널의 ovpn 모듈에서 작업 큐가 모듈 소유가 아닌 전역 시스템 큐를 사용하여 발생하는 취약점입니다. 모듈이 종료될 때 실행 중인 콜백 함수가 완료되기 전에 모듈 텍스트가 해제될 수 있어 문제가 됩니다.
💡 쉬운 설명
프로그램이 종료될 때 아직 실행 중인 작업이 남아있는데, 프로그램의 몸체가 먼저 사라져서 오류가 발생하는 문제입니다. 이로 인해 시스템이 불안정해지거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ovpn: run deferred work on a module-owned workqueue
ovpn queues several work items whose callbacks execute module text.
These works currently run on the global system workqueues, so module
exit has no driver-owned drain point that guarantees the callbacks have
fully returned before the module text can be freed.
Object references protect the objects used by the callbacks, but they do
not prove that a workqueue function has returned. In particular, a
worker can drop the final reference that unblocks device teardown while
it is still executing ovpn code.
Add a module-owned workqueue and queue all ovpn work items on it. During
module exit, unregister rtnl and netlink first, flush the workqueue so
ordinary ovpn workers finish, run the final RCU barrier, and destroy the
workqueue last. This keeps the workqueue available for cleanup work
queued from RCU callbacks, while ensuring no ovpn work item can outlive
the module text.
The per-device delayed keepalive work remains explicitly disabled during
netdev teardown (disable_delayed_work_sync in ndo_uninit), since
flush_workqueue does not flush delayed work that is still only pending
on its timer.
📍 영향받는 시스템
Linux kernel (ovpn module 사용 환경)
⚔️ 공격 벡터
로컬 공격자가 모듈 종료 시점을 조작하여 실행 중인 작업이 해제된 메모리 영역을 참조하도록 유도
🛡️ 대응 방법
ovpn 모듈에 전용 작업 큐를 도입하고 모듈 종료 시 이를 안전하게 비우도록 커널 패치 적용
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인합니다.