🇰🇷 한글 설명
Linux 커널의 net/smc 구성 요소에서 smc_rx_pipe_buf_release() 함수 호출 시 Use-After-Free 취약점이 발견되었습니다. 소켓 상태를 확인하는 과정에서 락(lock)을 획득하기 전에 상태를 검사하여, 연결이 해제된 후에도 이미 해제된 메모리 영역에 접근할 수 있는 문제가 발생합니다.
💡 쉬운 설명
컴퓨터의 통신 기능을 담당하는 핵심 프로그램에서, 이미 사용이 끝나서 삭제된 메모리 주소를 다시 사용하려고 시도할 때 발생하는 오류입니다. 이로 인해 시스템이 갑자기 멈추거나 보안 공격에 노출될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net/smc: fix use-after-free in smc_rx_pipe_buf_release()
smc_rx_splice() hands RMB pages to a pipe and takes a socket reference
per entry so the smc_sock stays alive until the reader finishes. The
connection does not: a concurrent close runs smc_conn_free(), which
releases the receive buffer back to the link group pool.
smc_rx_pipe_buf_release() tests sk_state before taking the socket lock.
The state can change between the test and the lock, and
smc_rx_update_cons() then dereferences conn->rmb_desc and walks
conn->lgr, which smc_conn_free() has already released. On the
is_reg_err path smcr_buf_unuse() frees the descriptor outright, so
this is a use-after-free.
Take the socket lock first and test conn->freed instead.
smc_conn_free() sets that flag before releasing anything, and every
caller holds the socket lock. The two paths exclude each other: either
the pipe release runs first with everything valid, or it sees the flag
and skips the update.
📍 영향받는 시스템
Linux Kernel (SMC 프로토콜을 사용하는 버전)
⚔️ 공격 벡터
동시에 발생하는 소켓 연결 종료 및 데이터 읽기 작업을 통해 메모리 오류 유도
🛡️ 대응 방법
SMC 관련 패치가 적용된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 최신 패치 버전인지 확인합니다.