🇰🇷 한글 설명
Linux 커널의 nvme-tcp 드라이버에서 요청된 데이터 크기보다 적은 양의 데이터를 수신하더라도 이를 정상적인 읽기 작업으로 처리하는 취약점이 발견되었습니다. 이로 인해 사용자는 요청한 데이터 대신 메모리에 남아있던 이전 데이터(잔여 데이터)를 읽게 될 위험이 있습니다.
💡 쉬운 설명
데이터를 요청했을 때 실제 받은 양이 부족해도 시스템이 이를 정상으로 착각하여 잘못된 정보를 전달할 수 있는 문제입니다. 이 과정에서 원래 데이터가 아닌 메모리에 남아있던 다른 정보가 노출될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
nvme-tcp: reject a read that transferred too few bytes
nvme_tcp_recv_data() completes a request once the current C2HData PDU
has been consumed. Nothing compares the total bytes received against
the length the command asked for: struct nvme_tcp_request has no
receive-side counter, queue->data_remaining is per queue, and
blk_mq_end_request() completes for blk_rq_bytes(rq) unconditionally
with no residual concept anywhere above.
A controller can therefore answer a 4096-byte read with 512 bytes and
have it reported as a complete read; user space then gets 4096 bytes of
which 3584 are whatever was already in the page. I reproduced that with
a test target.
Count the bytes received and refuse to complete a successful read whose
count does not match, at the two NVME_TCP_F_DATA_SUCCESS paths and in
nvme_tcp_process_nvme_cqe(). The success test shifts req->status right
by one, because the driver keeps the wire value there and shifts it on
completion, so the check must see what the completion path will see.
Only REQ_OP_READ is checked, because there the length comes from the
sectors the request covers; a passthrough command is built by its
submitter, which picks both command and buffer, so the kernel has
nothing to compare against.
📍 영향받는 시스템
Linux kernel (nvme-tcp driver component)
⚔️ 공격 벡터
악의적인 NVMe-over-TCP 컨트롤러가 요청된 크기보다 적은 데이터를 전송하여 메모리 잔여 데이터를 유출함
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 nvme-tcp 데이터 검증 로직을 적용해야 함
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인하십시오.