CVE-2021-47198: scsi: lpfc: Fix use-after-free in lpfc_unreg_rpi() routine
In the Linux kernel, the following vulnerability has been resolved:
scsi: lpfc: Fix use-after-free in lpfc_unreg_rpi() routine
An error is detected with the following report when unloading the driver:
"KASAN: use-after-free in lpfc_unreg_rpi+0x1b1b"
The NLP_REG_LOGIN_SEND nlp_flag is set in lpfc_reg_fab_ctrl_node(), but the
flag is not cleared upon completion of the login.
This allows a second call to lpfc_unreg_rpi() to proceed with nlp_rpi set
to LPFC_RPI_ALLOW_ERROR. This results in a use after free access when used
as an rpi_ids array index.
Fix by clearing the NLP_REG_LOGIN_SEND nlp_flag in
lpfc_mbx_cmpl_fc_reg_login().
Security readout for executives and security teams
Plain-English summary
CVE-2021-47198 is a Linux kernel bug in the lpfc storage driver. Under a specific cleanup path, the driver can access memory after it has been freed, detected by KASAN while unloading the driver. The source does not provide a CVSS score, public exploit evidence, or a named workaround.
Executive priority
Handle through normal kernel patch governance, with higher priority for Fibre Channel storage servers. There is no source-backed evidence of active exploitation, but kernel memory-safety faults in storage paths can affect availability and operational stability.
Technical view
The lpfc Fibre Channel SCSI driver fails to clear NLP_REG_LOGIN_SEND after fabric controller login completion. A later lpfc_unreg_rpi() call can proceed with nlp_rpi set to LPFC_RPI_ALLOW_ERROR, causing use-after-free access when indexing rpi_ids. The listed fix clears the flag in lpfc_mbx_cmpl_fc_reg_login().
Likely exposure
Exposure is most plausible on Linux systems using the lpfc driver for Broadcom/Emulex Fibre Channel storage. The provided affected-version data references Linux 5.14, 5.15.5, and 5.16, but the exact range format is incomplete in the bundle.
Exploitation context
The provided sources do not show active exploitation, CISA KEV listing, exploit code, or a remote attack path. The observed failure occurred during driver unload. Treat exploitability beyond local or operational crash conditions as unproven from these sources.
Researcher notes
The bundle identifies the root cause and fix location but lacks CVSS, CWE, exploitability analysis, and precise affected-range semantics. Avoid assuming remote code execution or privilege escalation without additional vendor analysis.
Mitigation direction
Check distribution kernel advisories for CVE-2021-47198 fixes.
Update affected Linux kernels to builds containing the referenced stable commits.
Prioritize storage hosts using the lpfc driver.
Follow vendor guidance if kernel updates are not immediately available.
Validation and detection
Inventory hosts with the lpfc kernel module loaded or installed.
Map kernel versions against vendor advisories for CVE-2021-47198.
Confirm patched kernels include the referenced upstream stable fixes.
Review logs for KASAN or kernel errors mentioning lpfc_unreg_rpi.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2021-47198 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.