scsi: qla2xxx: edif: Fix NULL pointer deref in RX SA delete check
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ dd30706e73b70d67e88fdaca688db7a3374fd5de · < 75fd6d041c4a325ae37f4683e6678d3015988bb0| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
scsi: qla2xxx: edif: Fix NULL pointer deref in RX SA delete check
qla_chk_edif_rx_sa_delete_pending() obtains the SCSI command via GET_CMD_SP(sp) and immediately dereferences cmd->sc_data_direction. That command pointer can be NULL: the firmware may post a status completion for a command that has already been returned or aborted. The caller qla2x00_status_entry() acknowledges this on the very same status path, re-fetching GET_CMD_SP(sp) and bailing out with the "Command already returned" message when it is NULL -- but that check runs only after qla_chk_edif_rx_sa_delete_pending() has already dereferenced the pointer, so a NULL cmd crashes the kernel in interrupt context.
Return early when cmd is NULL, before touching cmd->sc_data_direction.
From the CVE record · Linux
The Linux kernel's qla2xxx edif code can dereference a NULL SCSI command pointer when firmware posts a status completion for a command that has already been returned or aborted. This can crash the kernel in interrupt context. The input does not establish whether an attacker can trigger the condition or whether access or user interaction is required.
Engineers running Linux kernels with the qla2xxx edif code should check their versions; affected versions were not specified.