🇰🇷 한글 설명
Linux 커널의 ESP(Encapsulating Security Payload) 구현에서 제로카피(zerocopy) 관리 프래그먼트의 소유권 처리 오류가 발견되었습니다. 이로 인해 메모리 참조 횟수가 잘못 계산되어 Use-After-Free(UAF) 취약점이나 메모리 누수가 발생할 수 있습니다.
💡 쉬운 설명
데이터를 복사하지 않고 효율적으로 전달하는 과정에서 메모리 관리 규칙을 어겨 시스템이 불안정해질 수 있습니다. 이로 인해 해커가 메모리를 조작하거나 시스템 자원을 고갈시킬 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
esp: downgrade zerocopy managed frags before mutating skb frags
On the out-of-place output path (esp->inplace == false) ESP rewrites the
skb frag array: esp_output_head() appends a trailer frag and
esp_output_tail() replaces the frags with a destination page, both
referenced with get_page().
When the skb carries zerocopy managed frags (SKBFL_MANAGED_FRAG_REFS) the
payload frags are owned by the ubuf and must not be referenced or
unreferenced individually, but ESP mutates the frag array without ever
downgrading the skb. This breaks the managed-frag invariant two ways:
- esp_ssg_unref() walks the source scatterlist and drops a page
reference for every frag, including the ubuf-owned payload frags,
pushing their refcount below the GUP pin bias while the pages are
still pinned, i.e. a use-after-free of the zerocopy pages;
- esp_output_tail() installs its destination page as frag 0 with
get_page() but leaves SKBFL_MANAGED_FRAG_REFS set, so
skb_release_data() takes the skip_unref branch and never drops that
reference, leaking the x->xfrag page at packet rate.
Fix this the way every other frag-mutating site does (__ip_append_data(),
__ip6_append_data(), tcp_sendmsg_locked()) and call
skb_zcopy_downgrade_managed() before ESP touches the frag array: it takes
a real reference on each existing frag and clears SKBFL_MANAGED_FRAG_REFS,
so the per-frag unref in esp_ssg_unref() and the frag release in
skb_release_data() are both balanced and no mixed-ownership frag array is
left behind.
📍 영향받는 시스템
Linux Kernel (ESP zero-copy managed frags 관련 기능 사용 시)
⚔️ 공격 벡터
특수하게 조작된 네트워크 패킷을 전송하여 ESP 처리 과정에서 메모리 오류 유도
🛡️ 대응 방법
커널 패치 적용을 통해 ESP 처리 전 skb_zcopy_downgrade_managed() 함수가 호출되도록 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 최신 패치 버전인지 확인
📊 CVSS Vector String
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
💻 영향받는 소프트웨어
NVIDIA Cloud Gaming Guest Driver for Linux