scsi: qla2xxx: Zero-init bsg stack buffers to avoid info leak
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 697a4bc69159c3396035b0506ffa55c4b2d0b1f4 · < 4fe5790674097897a1af1367d1e384f7e5a62fb7| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
scsi: qla2xxx: Zero-init bsg stack buffers to avoid info leak
Several bsg handlers stage their request/reply in an uninitialized 256-byte on-stack buffer (uint8_t bsg[DMA_POOL_SIZE]) and fill it via sg_copy_to_buffer(), which only copies as many bytes as the user-supplied request payload. When the request is shorter than the structure, the remainder of the buffer is left holding stale stack data.
qla2x00_read_fru_status() and qla2x00_read_i2c() then copy the full structure back to the reply payload with sg_copy_from_buffer(), leaking the uninitialized stack bytes to user space. The write/update paths do not copy the buffer back, but can feed uninitialized fields to the device.
Zero the stack buffer at declaration in all five handlers, mirroring the heap kzalloc() approach, so short requests can no longer expose stale memory.
From the CVE record · Linux
The Linux kernel’s qla2xxx bsg handlers use uninitialized stack buffers for short requests. A local user who submits a short request to the affected read handlers can receive stale stack data in the reply; the description does not specify whether authentication or additional privileges are required.
Engineers running Linux kernels with the qla2xxx driver should check their installations; affected versions were not specified.