scsi: qla2xxx: Fix FCE trace use-after-free during firmware dump
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 841df27d619ee1f5ca6473e15227b39d6136562d · < 8e7a26931b6111583cfeaf49c068f26524dc3af2| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
scsi: qla2xxx: Fix FCE trace use-after-free during firmware dump
qla2x00_free_fce_trace() freed and cleared ha->fce while holding only fce_mutex. The firmware-dump consumers qla27xx_fwdt_entry_t264() and qla25xx_copy_fce() read ha->fce (NULL check followed by a copy of the buffer) under hardware_lock and never take fce_mutex. A debugfs FCE disable could therefore free the DMA buffer between a dump's NULL check and its copy, resulting in a use-after-free.
Unpublish ha->fce under hardware_lock, then release the lock and free the DMA buffer (dma_free_coherent() may sleep). A concurrent dump either completes its check and copy with the buffer still valid, or observes ha->fce == NULL and skips it.
From the CVE record · Linux
The Linux kernel's qla2xxx driver can use a freed FCE DMA buffer during a firmware dump. This can happen when a debugfs FCE disable races with the dump's buffer copy; the input does not specify attacker access requirements or impact beyond the use-after-free.
Engineers running Linux kernels with the qla2xxx driver should check whether their kernel includes the fix; affected versions are not specified.