🇰🇷 한글 설명
Linux 커널의 RDMA/rxe 구성 요소에서 QP(Queue Pair)가 오류 상태로 전환될 때 현재 패킷을 재처리하는 취약점이 발견되었습니다. 이로 인해 동일한 패킷이 중복 처리되어 데이터 스트림이 손상되거나, 수신 큐가 고갈될 경우 커널 NULL 포인터 역참조로 인한 시스템 충돌(Kernel Panic)이 발생할 수 있습니다.
💡 쉬운 설명
네트워크 통신 중 오류가 발생했을 때, 이미 처리된 데이터를 컴퓨터가 실수로 여러 번 다시 읽어 들여 데이터가 꼬이거나 시스템이 멈추는 문제입니다. 이 과정에서 잘못된 메모리 접근이 발생하여 컴퓨터 전체가 다운될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
RDMA/rxe: Avoid reprocessing the current packet after the QP enters the error state
When do_complete() finds the QP in the error state it returns
RESPST_CHK_RESOURCE. Before commit 49dc9c1f0c7e ("RDMA/rxe: Cleanup
reset state handling in rxe_resp.c") this was the flush loop:
check_resource() had an error-state branch that fetched each remaining
recv WQE and completed it with IB_WC_WR_FLUSH_ERR, without touching
the current packet. That commit removed the error-state branch from
check_resource() (draining is now done at rxe_receiver() entry) but
kept the do_complete() error-state return.
As a result, when a QP moves to the error state while a packet is
being completed - e.g. an rdma_cm disconnect racing with receive
processing - the responder state machine loops back into the request
processing chain with the already-completed packet still in hand:
check_resource() fetches a fresh recv WQE, execute()/send_data_in()
copies the same packet payload again, do_complete() posts another
IB_WC_SUCCESS CQE (qp->resp.status is still 0), and control returns
to the error-state check. The loop re-executes the same packet once
per posted recv WQE (observed: ~1000 duplicate IB_WC_SUCCESS
completions of one SEND, one per ~8us, matching the RQ occupancy)
until the RQ is exhausted, after which qp->resp.wqe is NULL and
send_data_in() dereferences it:
BUG: kernel NULL pointer dereference, address: 0000000000000014
Workqueue: rxe_wq do_work
RIP: copy_data+0x29/0x1f0
Call Trace:
send_data_in+0x25/0x50
rxe_receiver+0xf36/0x1dd0
The duplicate completions are indistinguishable from real receives to
the ULP. During an rds stress test, the message was accepted as new and
delivered the same datagram to user space hundreds of times, corrupting
the stream; any ULP that relies on RC exactly-once delivery is affected.
A live packet reaching the error-state check in do_complete() has
been executed and completed exactly once and must be consumed, not
re-processed. Return RESPST_CLEANUP for it (dequeue and free); keep
returning RESPST_CHK_RESOURCE for the pkt == NULL case.
📍 영향받는 시스템
Linux kernel (RDMA/rxe driver 사용 환경)
⚔️ 공격 벡터
RDMA 통신 중 의도적인 연결 해제(rdma_cm disconnect)를 유도하여 레이스 컨디션(Race Condition)을 발생시킴
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 수정된 패치 버전 이상인지 확인하십시오.