🇰🇷 한글 설명
Linux 커널의 RDMA/ucma 구성 요소에서 발생하는 레이스 컨디션 취약점입니다. 동시 다발적인 멀티캐스트 가입(JOIN) 요청 시 뮤텍스 잠금 해제 시점의 오류로 인해, 이미 해제된 메모리 주소를 참조하는 Use-After-Free 문제가 발생할 수 있습니다.
💡 쉬운 설명
여러 사용자가 동시에 네트워크 그룹에 가입하려고 할 때, 시스템이 데이터 처리 순서를 제대로 관리하지 못해 발생하는 오류입니다. 이로 인해 이미 삭제된 데이터를 다시 사용하려다 시스템이 충돌하거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
RDMA/ucma: Serialize join and leave on copy_to_user failure
rdma_join_multicast() queues RoCE work that later reads the ucma_multicast
through event->param.ud.private_data, then list_add()s the CMA multicast
at the head of id_priv->mc_list. rdma_leave_multicast() matches only by
sockaddr and destroys the first hit.
ucma_process_join() used to drop ctx->mutex after a successful join and
retake it only if copy_to_user() failed. Two concurrent JOIN_MCAST calls
with the same address can therefore insert a second CMA entry before the
first thread's leave. leave then cancels the newer work and the older
worker still dereferences the ucma_multicast that the first thread frees.
Keep ctx->mutex held from rdma_join_multicast() through copy_to_user() and,
on -EFAULT, through rdma_leave_multicast() so leave cannot miss this join.
Do not leave if join itself failed: that path never published this address
on mc_list, and a leave-by-addr would destroy an earlier successful join.
📍 영향받는 시스템
RDMA/ucma 기능을 사용하는 Linux 커널 버전
⚔️ 공격 벡터
동일한 주소에 대해 동시에 여러 개의 멀티캐스트 가입(JOIN_MCAST) 요청을 보내는 레이스 컨디션 공격
🛡️ 대응 방법
RDMA/ucma 관련 패치가 적용된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인