scsi: qedi: Fix use after free bug in qedi_remove()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 4b1068f5d74b6cc92319bd7eba40809b1222e73f · < c5749639f2d0a1f6cbe187d05f70c2e7c544d748| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
scsi: qedi: Fix use after free bug in qedi_remove()
In qedi_probe() we call __qedi_probe() which initializes &qedi->recovery_work with qedi_recovery_handler() and &qedi->board_disable_work with qedi_board_disable_work().
When qedi_schedule_recovery_handler() is called, schedule_delayed_work() will finally start the work.
In qedi_remove(), which is called to remove the driver, the following sequence may be observed:
Fix this by finishing the work before cleanup in qedi_remove().
CPU0 CPU1
|qedi_recovery_handler qedi_remove | __qedi_remove | iscsi_host_free | scsi_host_put | //free shost | |iscsi_host_for_each_session |//use qedi->shost
From the CVE record · Linux
The Linux kernel's qedi driver can use a freed SCSI host if driver removal overlaps with scheduled recovery work. The input does not specify how an attacker could trigger this condition or whether authentication or user interaction is required.
Engineers running Linux kernels with the qedi driver should check whether their kernel is affected; affected versions are not specified.