🇰🇷 한글 설명
Linux 커널의 sk_msg 구현에서 scatterlist의 sg.copy 비트가 데이터 이동 시 동기화되지 않는 취약점이 발견되었습니다. 이로 인해 외부 페이지 캐시 데이터가 쓰기 가능한 BPF 컨텍스트로 노출되어 시스템 메모리가 오염될 수 있습니다.
💡 쉬운 설명
리눅스 운영체제의 데이터 처리 과정에서 보안 표시가 제대로 전달되지 않는 오류가 있습니다. 공격자가 이 허점을 이용하면 시스템의 중요한 파일 데이터나 메모리를 마음대로 수정할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net: skmsg: preserve sg.copy across SG transforms
The sk_msg sg.copy bitmap is part of the scatterlist entry ownership
state. A set bit tells sk_msg_compute_data_pointers() not to expose the
entry through writable BPF ctx->data. This protects entries backed by
pages that are not private to the sk_msg, such as splice-backed file
page-cache pages.
Several sk_msg transform paths move, copy, split, or compact
msg->sg.data[] entries without moving the matching sg.copy bit. This can
make an externally backed entry arrive at a new slot with a clear copy
bit. A later SK_MSG verdict can then expose sg_virt(sge) as writable
ctx->data and BPF stores can modify the original page cache.
Keep sg.copy synchronized with sg.data[] whenever entries are
transferred, shifted, split, or copied into a new sk_msg. Clear the bit
when an entry is replaced by a newly allocated private page or freed.
This covers the BPF pull/push/pop helpers, sk_msg_shift_left/right(),
sk_msg_xfer(), and tls_split_open_record(), including the partial tail
entry created during TLS open-record splitting.
📍 영향받는 시스템
Linux Kernel (sk_msg 관련 기능이 활성화된 버전)
⚔️ 공격 벡터
BPF(Berkeley Packet Filter)를 통해 조작된 sk_msg 데이터를 전송하여 페이지 캐시 메모리에 쓰기 권한을 획득
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인