🇰🇷 한글 설명
Linux 커널의 RDMA/core 구성 요소에서 ib_destroy_cq_user() 함수 호출 시 발생하는 Use-After-Free 취약점입니다. CQ(Completion Queue)를 삭제할 때 리소스 추적(restrack) 제거 시점이 너무 늦어, 이미 해제된 벤더 특정 리소스에 접근할 수 있는 보안 허점이 존재했습니다.
💡 쉬운 설명
컴퓨터가 사용 중인 데이터를 삭제할 때, 삭제 목록에서 먼저 지우지 않고 데이터부터 지워버려서 발생하는 문제입니다. 이로 인해 시스템이 이미 사라진 데이터를 다시 참조하려고 시도하다가 오류가 발생하거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
RDMA/core: Fix potential use after free in ib_destroy_cq_user()
When accessing a CQ via the netlink path the only synchronization
mechanism for the said CQ is rdma_restrack_get().
Currently, rdma_restrack_del() is invoked at the end of
ib_destroy_cq_user(), which is too late, since by that point
vendor-specific resources associated with the CQ might already be
freed. This can leave a short window where the CQ remains accessible
through restrack, leading to a potential use-after-free.
Fix this by moving the rdma_restrack_begin_del() call to the start of
ib_destroy_cq_user(), ensuring that the CQ is removed from restrack
before its internal resources are released. This guarantees that no new
users hold references to a CQ that is in the process of destruction.
In addition, this change preserves the intended inverted order
between create and destroy routines: resources are added to
restrack at the end of successful creation, and hence shall be removed
from the restrack first thing during the destruction flow, which keeps
the lifecycle management consistent and predictable.
📍 영향받는 시스템
RDMA 기능을 사용하는 Linux 커널 버전
⚔️ 공격 벡터
Netlink 경로를 통해 CQ에 접근하여 특정 타이밍에 리소스 해제를 유도하는 방식
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 rdma_restrack_begin_del() 호출 시점을 수정해야 합니다.
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전 이상인지 확인합니다.