🇰🇷 한글 설명
Linux 커널의 net/handshake 구성 요소에서 파일 참조 관리 오류로 인해 발생하는 취약점입니다. handshake_req_submit 과정에서 소켓 파일에 대한 명시적인 참조를 유지하지 않아, 소켓이 해제되는 동안 파일 포인터가 유효하지 않게 될 수 있는 레이스 컨디션 문제가 존재합니다.
💡 쉬운 설명
컴퓨터의 핵심 운영체제인 리눅스에서 특정 통신 과정 중 데이터가 담긴 파일 주소를 놓쳐버리는 오류가 발견되었습니다. 이로 인해 시스템이 갑자기 멈추거나 보안이 뚫릴 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net/handshake: Take a long-lived file reference at submit
handshake_nl_accept_doit() needs the file pointer backing
req->hr_sk->sk_socket to survive the window between
handshake_req_next() and the subsequent FD_PREPARE() and get_file().
The submit-side sock_hold() does not provide that. sk_refcnt keeps
struct sock alive, but struct socket is owned by sock->file: when
the consumer fputs the last file reference, sock_release() tears
the socket down regardless of any sock_hold.
Add an hr_file pointer to struct handshake_req and acquire an
explicit reference on sock->file during handshake_req_submit().
handshake_complete() and handshake_req_cancel() release the
reference on the completion-bit-winning path.
The submit error path must also release the file reference, but
after rhashtable insertion a concurrent handshake_req_cancel() can
discover the request and race the error path. Gate the error-path
cleanup -- sk_destruct restoration, fput, and request destruction
-- with test_and_set_bit(HANDSHAKE_F_REQ_COMPLETED), the same
serialization handshake_complete() and handshake_req_cancel()
already use. When cancel has already claimed ownership, the submit
error path returns without touching the request; socket teardown
handles final destruction.
The accept-side dereferences are not yet retargeted; that change
comes in the next patch.
📍 영향받는 시스템
Linux Kernel (handshake 모듈을 사용하는 버전)
⚔️ 공격 벡터
특정 네트워크 핸드셰이크 요청을 전송하여 소켓 해제와 요청 처리가 동시에 일어나는 레이스 컨디션 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 handshake_req 구조체에 파일 참조 로직을 적용해야 합니다.
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인합니다.