scsi: qla2xxx: Zero mailbox struct in qla2x00_get_firmware_state()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 4d4df1932b6b116aecc81039066fec27f2050762 · < e6cfb1ee18336aab41a0941d6d3ea5009aaafc05| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
scsi: qla2xxx: Zero mailbox struct in qla2x00_get_firmware_state()
The mbx_cmd_t is allocated on the stack but left uninitialized. qla2x00_mailbox_command() has several early-return paths (PCI permanent failure, device failed, EEH busy, ISP abort pending, mailbox access timeout, purge mbox) that return without writing the input mailbox registers back into mcp->mb[]. qla2x00_get_firmware_state() then unconditionally copies mcp->mb[1..6] (and mb[12]) into the caller's states[] array regardless of the return value.
On such a failure the copied values are uninitialized kernel stack memory, which is then exposed to userspace via the fw_state and mpi_fw_state sysfs handlers. Zero the mailbox struct so a failed query yields deterministic zeroed state instead of leaking stack contents.
From the CVE record · Linux
The qla2xxx driver can copy uninitialized kernel stack data into firmware-state values exposed through sysfs. A local user reading the fw_state or mpi_fw_state sysfs handler could receive that data when a mailbox command exits early due to a failure. No further user interaction is described.
Anyone running a Linux kernel with the qla2xxx driver should check their version; affected versions are not specified.