🇰🇷 한글 설명
Linux 커널의 RDMA/rxe 구성 요소에서 WQE(Work Queue Element)의 sge 배열 인덱스를 검증하지 않아 발생하는 취약점입니다. 로컬 권한을 가진 사용자가 조작된 num_sge 또는 cur_sge 값을 사용하여 vmalloc 영역에서 경계 외 읽기(Out-of-Bounds Read)를 유발할 수 있으며, 이는 시스템 서비스 거부(DoS)로 이어질 수 있습니다.
💡 쉬운 설명
컴퓨터의 메모리 관리 규칙을 어기는 잘못된 명령을 보내 시스템이 읽어서는 안 될 영역을 읽게 만드는 오류입니다. 이로 인해 시스템이 멈추거나 비정상적으로 작동할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
RDMA/rxe: Validate num_sge/cur_sge before indexing wqe->dma.sge[]
For a user QP, qp->sq.queue is a ring the application writes directly,
so rxe_post_send() takes the is_user branch and only schedules send_task
without validating the WQE. rxe_requester() consumes it in place via
req_next_wqe() and calls copy_data(), which indexes
&wqe->dma.sge[cur_sge] with the attacker-controlled num_sge/cur_sge.
Only the kernel path bounds num_sge (validate_send_wr()); the user WQE
is never checked, so a local unprivileged user can post a WQE with an
out-of-range cur_sge or oversized num_sge and force an out-of-bounds
read of the per-WQE sge array in copy_data() (vmalloc OOB read, local
DoS).
Bound num_sge to qp->sq.max_sge in rxe_requester() before use, the way
get_srq_wqe() already guards SRQ entries, and bound cur_sge only when
the WQE carries payload (dma.resid): copy_data() returns early on a
zero-length copy before touching dma->sge[], so a zero-payload WQE --
the only kind a max_sge == 0 QP can post -- stays valid.
Reproduced under KASAN; the vmalloc-out-of-bounds in copy_data() is gone.
📍 영향받는 시스템
RDMA/rxe 모듈을 사용하는 Linux 커널 버전
⚔️ 공격 벡터
로컬 권한을 가진 사용자가 조작된 WQE를 전송하여 메모리 경계 외 읽기 유발
🛡️ 대응 방법
rxe_requester() 함수 내에서 num_sge를 qp->sq.max_sge 범위 내로 제한하도록 커널 패치 적용
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 최신 보안 패치 버전인지 확인합니다.