🇰🇷 한글 설명
Linux 커널의 qla2xxx SCSI 드라이버에서 NVMe LS 거부(reject)를 전송할 때 qpair 잠금(lock)을 유지하지 않아 발생하는 취약점입니다. 이로 인해 요청 링의 프로듀서 상태가 손상되어 명령어가 중복되거나 누락될 수 있습니다.
💡 쉬운 설명
컴퓨터의 저장 장치와 통신하는 드라이버 프로그램에서 데이터 처리 순서를 관리하는 잠금 장치가 제대로 작동하지 않는 문제입니다. 이로 인해 데이터 명령이 꼬이거나 사라지는 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
scsi: qla2xxx: Hold qpair lock when sending NVMe LS reject
qla_nvme_ls_reject_iocb() allocates from and advances the request ring
through __qla2x00_alloc_iocbs() (which assumes the hardware_lock is
held) and qla2x00_start_iocbs() (which advances the ring and rings the
request-in doorbell), but takes no lock itself. Two of its callers
invoke it without the producer lock held:
- qla_nvme_xmt_ls_rsp(), the NVMe-FC .xmt_ls_rsp transport callback, on
its error path, and
- qla2xxx_process_purls_pkt(), run from the purex work/DPC context.
Both use ha->base_qpair, whose qp_lock_ptr is hardware_lock, so they can
run concurrently with normal I/O submission on the base ring and corrupt
the ring producer state, leading to duplicated or dropped commands. The
third caller, qla2xxx_process_purls_iocb(), runs inside
qla24xx_process_response_queue() with the qpair lock already held and is
safe; that is also why the lock cannot be taken inside the helper itself
(it would recursively re-acquire hardware_lock on the response path).
Take qp_lock_ptr around the two unlocked callers and document the helper
as caller-locked. Both run in process context, so spin_lock_irqsave() is
used and nothing in the locked region sleeps.
📍 영향받는 시스템
Linux kernel (qla2xxx SCSI driver)
⚔️ 공격 벡터
특정 네트워크/스토리지 환경에서 NVMe-FC 전송 콜백 또는 DPC 컨텍스트를 유도하여 레이스 컨디션 유발
🛡️ 대응 방법
qla2xxx 드라이버의 잠금 메커니즘이 수정된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인