🇰🇷 한글 설명
Linux 커널의 io_uring/net 구성 요소에서 발생한 취약점으로, MSG_WAITALL 설정이나 스트리밍 소켓 사용 시 재시도 과정에서 버퍼가 적절히 해제되지 않고 유지되는 문제가 있습니다. 이로 인해 버퍼 링이 해제된 후 잘못된 메모리에 접근하거나, 여러 소켓이 동일한 메모리 버퍼를 공유하여 데이터가 오염될 수 있습니다.
💡 쉬운 설명
데이터를 주고받는 통로에서 메모리 관리가 제대로 되지 않아, 이미 사용이 끝난 메모리를 다시 쓰거나 다른 데이터가 섞여 들어올 수 있는 문제입니다. 이로 인해 프로그램이 갑자기 종료되거나 데이터가 변조될 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
io_uring/net: commit partial buffers on retry
Ring provided buffers are potentially only valid within the single
execution context in which they were acquired. io_uring deals with this
and invalidates them on retry. But on the networking side, if
MSG_WAITALL is set, or if the socket is of the streaming type and too
little was processed, then it will hang on to the buffer rather than
recycle or commit it. This is problematic for two reasons:
1) If someone unregisters the provided buffer ring before a later retry,
then the req->buf_list will no longer be valid.
2) If multiple sockers are using the same buffer group, then multiple
receives can consume the same memory. This can cause data corruption
in the application, as either receive could land in the same
userspace buffer.
Fix this by disallowing partial retries from pinning a provided buffer
across multiple executions, if ring provided buffers are used.
📍 영향받는 시스템
io_uring의 ring provided buffers 기능을 사용하는 Linux 커널 버전
⚔️ 공격 벡터
특정 네트워크 소켓 설정(MSG_WAITALL 등)을 이용해 메모리 버퍼를 비정상적으로 유지시켜 데이터 오염 또는 메모리 손상을 유도
🛡️ 대응 방법
io_uring 관련 버퍼 관리 로직이 수정된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인