🇰🇷 한글 설명
Linux 커널의 nvmet-fcloop 모듈에서 remoteport의 port_state를 확인하지 않고 done 콜백을 호출하던 문제가 해결되었습니다. 이로 인해 LS 응답 리소스(lsrsp) 해제 경로가 잘못 처리될 수 있었습니다. 수정으로 port_state가 ONLINE일 때만 콜백이 리소스를 해제하고, 그렇지 않으면 -ENODEV를 반환해 nvme-fc 전송 계층이 직접 해제하도록 합니다.
💡 쉬운 설명
NVMe over Fibre Channel 장치와 통신하는 리눅스 커널 기능에서 메모리 해제 처리가 잘못될 수 있던 버그입니다. 연결 상태를 확인하도록 고쳐 메모리 관련 오류를 막습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
nvmet-fcloop: Check remoteport port_state before calling done callback
In nvme_fc_handle_ls_rqst_work, the lsrsp->done callback is only set when
remoteport->port_state is FC_OBJSTATE_ONLINE. Otherwise, the
nvme_fc_xmt_ls_rsp's LLDD call to lport->ops->xmt_ls_rsp is expected to
fail and the nvme-fc transport layer itself will directly call
nvme_fc_xmt_ls_rsp_free instead of relying on LLDD's done callback to free
the lsrsp resources.
Update the fcloop_t2h_xmt_ls_rsp routine to check remoteport->port_state.
If online, then lsrsp->done callback will free the lsrsp. Else, return
-ENODEV to signal the nvme-fc transport to handle freeing lsrsp.
📍 영향받는 시스템
Linux 커널 (nvmet-fcloop 모듈을 포함한 수정 이전 버전)
⚔️ 공격 벡터
로컬 또는 SAN 연결 환경에서 연결 상태가 변하는 타이밍을 악용해 리소스 해제 오류를 유발할 가능성이 있음
🛡️ 대응 방법
배포판의 최신 Linux 커널 보안 업데이트를 적용하여 커널을 재부팅합니다.
🔧 검증 코드
출력된 커널 버전이 패치된 배포판 업데이트 버전 이상인지 확인하고, nvmet_fc 모듈이 로드되지 않았다면 이 취약점의 영향을 받지 않습니다.
uname -r && (lsmod | grep -i nvmet_fc || echo 'nvmet_fc 모듈 미로드')