🇰🇷 한글 설명
Linux 커널의 RDMA/rxe 구성 요소에서 멀티캐스트 그룹을 관리하는 과정 중 발생하는 Use-After-Free 취약점입니다. 멀티캐스트 주소 설정이 실패하더라도 해당 그룹이 관리 트리(mcg_tree)에 남아 있어, 이후 동일한 ID로 접근 시 해제된 메모리를 참조하게 됩니다.
💡 쉬운 설명
네트워크 설정 중 오류가 발생했을 때, 컴퓨터가 이미 사용이 끝난 메모리 주소를 계속 붙잡고 있어 발생하는 문제입니다. 이로 인해 시스템이 갑자기 멈추거나 보안 공격에 취약해질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
RDMA/rxe: insert mcg into mcg_tree only after rxe_mcast_add() succeeds
rxe_get_mcg() publishes a newly allocated multicast group in
rxe->mcg_tree before programming the backing Ethernet multicast address
with rxe_mcast_add(), which runs outside mcg_lock. A local userspace
RDMA client reaches this path with ATTACH_MCAST on a UD QP; if
rxe_mcast_add() then returns an error (for example -ENODEV when the
backing netdev has been removed, or a propagated dev_mc_add() error),
the unwind frees the published group without removing it from the tree.
A later lookup of the same MGID dereferences the freed struct rxe_mcg
from __rxe_lookup_mcg().
Fix this by keeping the new mcg private until rxe_mcast_add() succeeds.
Split the tree publication into __rxe_publish_mcg(), call rxe_mcast_add()
before taking the tree reference, and free the still-private mcg on
failure. Because the group is never visible in mcg_tree until the
multicast address is programmed, no concurrent caller can look it up or
attach a QP to a group that is about to be torn down, so the error path
needs no conditional unwind. If another caller publishes the same MGID
while the address is being programmed, the post-add re-check under
mcg_lock finds the winner; this caller then drops its private object and
balances its own rxe_mcast_add() with rxe_mcast_del() before returning
the winner.
Reproduced by forcing the rxe_mcast_add() error return under KASAN:
without the change the next attach to the same MGID reports a
slab-use-after-free in __rxe_lookup_mcg(); with it the forced failure
returns cleanly. A no-injection attach/detach regression, including a
two-QP shared join/leave and re-attach, stays KASAN- and leak-clean.
📍 영향받는 시스템
RDMA/rxe 모듈을 사용하는 Linux 커널 버전
⚔️ 공격 벡터
로컬 사용자 권한을 가진 공격자가 RDMA 클라이언트를 통해 특정 멀티캐스트 그룹 설정 오류를 유도하여 메모리 참조 오류 발생
🛡️ 대응 방법
RDMA/rxe 멀티캐스트 그룹 등록 로직이 수정된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인하십시오.
📊 CVSS Vector String
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
💻 영향받는 소프트웨어
NVIDIA Cloud Gaming Guest Driver for Linux