🇰🇷 한글 설명
Linux 커널의 RDMA/core 구성 요소에서 uverbs_free_dmah() 함수 호출 시 발생할 수 있는 Use-After-Free 취약점이 해결되었습니다. 기존에는 dmah 관련 리소스가 해제된 후 restrack에서 제거되어 짧은 시간 동안 접근이 가능한 문제가 있었으나, 제거 과정을 함수 시작 단계로 이동하여 이를 방지했습니다.
💡 쉬운 설명
컴퓨터의 메모리 관리 과정에서 이미 삭제된 데이터를 실수로 다시 사용하려고 할 때 발생하는 오류입니다. 이 오류를 방지하기 위해 데이터 삭제 순서를 올바르게 수정하여 시스템 안정성을 높였습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
RDMA/core: Fix potential use after free in uverbs_free_dmah()
When accessing a dmah via the netlink path the only synchronization
mechanism for the said dmah is rdma_restrack_get().
Currently, rdma_restrack_del() is invoked at the end of
uverbs_free_dmah(), which is too late, since by that point
vendor-specific resources associated with the dmah might already be
freed. This can leave a short window where the dmah 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
uverbs_free_dmah(), ensuring that the dmah is removed from restrack
before its internal resources are released. This guarantees that no new
users hold references to a dmah 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 경로를 통한 dmah 접근 시 발생하는 레이스 컨디션(Race Condition)을 이용한 메모리 오용
🛡️ 대응 방법
RDMA 관련 커널 패치를 적용하거나 최신 보안 업데이트가 반영된 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이상인지 확인