scsi: qla2xxx: Bound image count in qla2x00_update_fru_versions()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 697a4bc69159c3396035b0506ffa55c4b2d0b1f4 · < 7b22b4cb8822805cef7ba618da6f76e1474d68bd| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
scsi: qla2xxx: Bound image count in qla2x00_update_fru_versions()
qla2x00_update_fru_versions() copies the user-supplied BSG request into a fixed 256-byte stack buffer (bsg[DMA_POOL_SIZE]) and then iterates list->count times over the qla_image_version array embedded in that buffer, advancing the image pointer each iteration. count is taken directly from user input with no upper bound, while only (DMA_POOL_SIZE - sizeof(list->count)) / sizeof(struct qla_image_version) = 6 entries actually fit. A larger count walks the image pointer off the end of the stack buffer, reading adjacent kernel stack memory and sending it to the device via qla2x00_write_sfp().
Reject requests whose declared count does not fit in the buffer.
From the CVE record · Linux
The qla2xxx driver does not bound the image count in a user-supplied BSG request to the six entries that fit in its stack buffer. A local attacker able to submit such a request can cause the driver to read adjacent kernel stack memory and send it to the device; no user interaction is described.
Teams running Linux kernels with the qla2xxx driver should check whether their kernel includes the fix; affected versions are not specified.