🇰🇷 한글 설명
Linux 커널의 ESP(Encapsulating Security Payload) 처리 과정에서 skb_to_sgvec 호출 실패 시 페이지 파편(page frag) 참조가 해제되지 않는 메모리 누수 취약점이 발견되었습니다. 이로 인해 기존 페이지 참조가 적절히 해제되지 않아 시스템 자원이 고갈될 수 있습니다.
💡 쉬운 설명
데이터를 암호화하는 과정에서 오류가 발생했을 때, 사용하던 메모리 조각들을 제대로 반납하지 않고 버리는 문제가 있습니다. 이 문제가 반복되면 컴퓨터의 메모리가 점차 부족해져 시스템 성능이 떨어지거나 멈출 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
esp: fix page frag reference leak on skb_to_sgvec failure
In esp_output_tail(), when esp->inplace is false, the old skb page frags
are replaced with a new page from the xfrm page_frag cache. The source
scatterlist (sg) is built from the old frags before the replacement, and
esp_ssg_unref() is responsible for releasing the old page references
after the crypto operation completes.
However, if the second skb_to_sgvec() call (which builds the destination
scatterlist from the new page) fails, the code jumps to error_free which
only calls kfree(tmp). The old page frag references captured in the
source scatterlist are never released:
1. sg[] is built from old frags via skb_to_sgvec() (no extra get_page)
2. nr_frags is set to 1 and frag[0] is replaced with the new page
3. Second skb_to_sgvec() fails -> goto error_free
4. kfree(tmp) frees the sg[] memory but old frags are not unref'd
5. kfree_skb() only releases frag[0] (the new page), not the old ones
Fix this by adding a bool parameter to esp_ssg_unref() that, when true,
unconditionally unrefs the source scatterlist frags without checking
req->src and req->dst, since those fields are not yet initialized by
aead_request_set_crypt() at the point of the error. Existing callers
pass false to preserve the original behavior.
The same issue exists in both esp4 and esp6 as the code is identical.
📍 영향받는 시스템
Linux Kernel (ESP/XFRM 관련 모듈 사용 시스템)
⚔️ 공격 벡터
특수하게 조작된 네트워크 패킷을 전송하여 ESP 처리 중 skb_to_sgvec 오류를 유도함으로써 메모리 누수 발생
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이상인지 확인하십시오.
📊 CVSS Vector String
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
💻 영향받는 소프트웨어
NVIDIA Cloud Gaming Guest Driver for Linux