scsi: qla2xxx: Reject non-SCSI SRB on status IOCB fast path
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ dd30706e73b70d67e88fdaca688db7a3374fd5de · < 29f1f9ad9e354cd0b6e4f6fc75ba09162d6a04d9| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
scsi: qla2xxx: Reject non-SCSI SRB on status IOCB fast path
qla2x00_status_entry() filters out non-TYPE_SRB entries and the SRB_NVME_CMD, SRB_BIDI_CMD and SRB_TM_CMD types, then falls through to a SCSI fast path that assumes the command is an SRB_SCSI_CMD. The first thing on that path, qla_chk_edif_rx_sa_delete_pending(), and the subsequent handling both evaluate GET_CMD_SP(sp), i.e. sp->u.scmd.cmd.
The srb u union overlays the SCSI command pointer with other command layouts (bsg_job, iocb_cmd). If firmware delivers an unexpected STATUS_TYPE IOCB for a non-SCSI handle, sp->u.scmd.cmd can read as a non-NULL garbage pointer, bypassing the NULL checks in qla_chk_edif_rx_sa_delete_pending() and at the cp == NULL test, and leading to a wild pointer dereference.
Reject any SRB whose type is not SRB_SCSI_CMD before entering the fast path. The outstanding_cmds slot is left untouched so a genuinely non-SCSI command still completes through its proper handler.
From the CVE record · Linux
The Linux kernel’s qla2xxx driver can treat a non-SCSI command as a SCSI command on its status IOCB fast path. If firmware delivers an unexpected STATUS_TYPE IOCB for a non-SCSI handle, this can cause a wild pointer dereference. The input does not establish an attacker route, authentication requirement, or user-interaction requirement.
Engineers running Linux kernels with the qla2xxx driver should check their kernel version against the vendor advisory; affected versions were not provided.