🇰🇷 한글 설명
Linux 커널의 Open vSwitch에서 skb_tx_error() 호출 시 패킷의 공유 플래그를 잘못 제거하여 발생하는 취약점입니다. 이로 인해 MSG_ZEROCOPY를 사용하는 패킷의 경우, 공격자가 소유하지 않은 페이지 캐시에 데이터를 쓸 수 있는 'Fragnesia' 프리미티브가 생성됩니다.
💡 쉬운 설명
네트워크 패킷을 처리하는 과정에서 시스템의 중요한 메모리 보호 설정이 실수로 해제되는 문제입니다. 이를 통해 공격자가 권한 없이 시스템의 핵심 데이터가 저장된 메모리 영역을 조작할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
openvswitch: only skb_tx_error() a packet we are about to drop
queue_userspace_packet() borrows the packet skb -- it only copies it into
a private netlink message (user_skb) and does not own it; on return
do_execute_actions() keeps forwarding it through the flow's remaining
actions. Its error path nevertheless calls skb_tx_error(skb), which via
skb_zcopy_clear() does skb_shinfo(skb)->flags &= ~SKBFL_ALL_ZEROCOPY,
stripping SKBFL_SHARED_FRAG from that live skb (skb_tx_error()'s kerneldoc
says "skb must be freed afterwards").
For a MSG_ZEROCOPY skb carrying page-cache frags, SKBFL_SHARED_FRAG is
what makes esp_input() skb_cow_data() before in-place AEAD; once it is
stripped a later local ESP-in-UDP delivery decrypts in place over pages
the sender does not own -- an unprivileged page-cache write (the
"Fragnesia" primitive).
do_execute_actions() ignores output_userspace()'s return value, so any
action after a failed USERSPACE upcall inherits the stripped skb.
Move the skb_tx_error() to the flow-miss drop path - the "default"
branch of ovs_dp_process_packet()'s switch(error), before kfree_skb().
The call has been here since commit 36d5fe6a0007 ("core, nfqueue,
openvswitch: Orphan frags in skb_zerocopy and handle errors") but was
harmless until esp_input() began relying on SKBFL_SHARED_FRAG to gate
in-place decrypt; only then did stripping it on a still-forwarded skb
become a page-cache write primitive.
📍 영향받는 시스템
Linux Kernel (Open vSwitch 구성 요소 포함 버전)
⚔️ 공격 벡터
특수하게 조작된 MSG_ZEROCOPY 패킷을 전송하여 페이지 캐시 쓰기 권한을 획득
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 skb_tx_error() 호출 위치를 수정
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인