scsi: lpfc: Move NPIV's transport unregistration to after resource clean up
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
scsi: lpfc: Move NPIV's transport unregistration to after resource clean up
There are cases after NPIV deletion where the fabric switch still believes the NPIV is logged into the fabric. This occurs when a vport is unregistered before the Remove All DA_ID CT and LOGO ELS are sent to the fabric.
Currently fc_remove_host(), which calls dev_loss_tmo for all D_IDs including the fabric D_ID, removes the last ndlp reference and frees the ndlp rport object. This sometimes causes the race condition where the final DA_ID and LOGO are skipped from being sent to the fabric switch.
Fix by moving the fc_remove_host() and scsi_remove_host() calls after DA_ID and LOGO are sent.
From the CVE record · Linux
A race during NPIV deletion in the Linux kernel’s lpfc driver can skip the final fabric logout messages. The fabric switch may then continue to believe the deleted NPIV is logged in. The input does not specify an attacker action, access requirements, or user interaction.
Engineers running Linux kernels with the lpfc driver and NPIV should check their versions; affected versions are not specified.