🇰🇷 한글 설명
Linux 커널의 nvmet-tcp 구성 요소에서 데이터 다이제스트(digest) 불일치 발생 시 Use-After-Free(UAF) 취약점이 존재합니다. R2T 기반 데이터 전송 중 오류가 발생하면 명령어가 완료 처리되지 않은 상태에서 중복 해제되어 메모리 오류를 유발할 수 있습니다.
💡 쉬운 설명
데이터 전송 중 오류가 났을 때, 컴퓨터가 이미 정리한 데이터를 다시 정리하려고 시도하면서 발생하는 오류입니다. 이로 인해 시스템이 갑자기 멈추거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
nvmet-tcp: Fix potential UAF when ddgst mismatch
Shivam Kumar found via vulnerability testing:
When data digest is enabled on an NVMe/TCP connection and a digest
mismatch occurs on a non-final H2C_DATA PDU during an R2T-based
data transfer, the digest error handler in nvmet_tcp_try_recv_ddgst()
calls nvmet_req_uninit() — which performs percpu_ref_put() on the
submission queue — but does NOT mark the command as completed. It
does not set cqe->status, does not modify rbytes_done, and does not
clear any flag. When the subsequent fatal error triggers queue
teardown, nvmet_tcp_uninit_data_in_cmds() iterates all commands,
checks nvmet_tcp_need_data_in() for each one, and finds that the
already-uninited command still appears to need data (because
rbytes_done < transfer_len and cqe->status == 0). It therefore calls
nvmet_req_uninit() a second time on the same command — a double
percpu_ref_put against a single percpu_ref_get.
📍 영향받는 시스템
Linux kernel (nvmet-tcp 모듈 사용 환경)
⚔️ 공격 벡터
NVMe/TCP 연결 시 의도적인 데이터 다이제스트 불일치를 유도하여 메모리 오류 유발
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인