CVE-2022-49535

scsi: lpfc: Fix null pointer dereference after failing to issue FLOGI and PLOGI

State
Published
Severity
8.8 High
Published
Feb 26, 2025
Updated
Aug 5, 2026
Reserved
Feb 26, 2025

Read the record on cve.org

Description

In the Linux kernel, the following vulnerability has been resolved:

scsi: lpfc: Fix null pointer dereference after failing to issue FLOGI and PLOGI

If lpfc_issue_els_flogi() fails and returns non-zero status, the node reference count is decremented to trigger the release of the nodelist structure. However, if there is a prior registration or dev-loss-evt work pending, the node may be released prematurely. When dev-loss-evt completes, the released node is referenced causing a use-after-free null pointer dereference.

Similarly, when processing non-zero ELS PLOGI completion status in lpfc_cmpl_els_plogi(), the ndlp flags are checked for a transport registration before triggering node removal. If dev-loss-evt work is pending, the node may be released prematurely and a subsequent call to lpfc_dev_loss_tmo_handler() results in a use after free ndlp dereference.

Add test for pending dev-loss before decrementing the node reference count for FLOGI, PLOGI, PRLI, and ADISC handling.

Scores

CVSSScoreVectorSource
3.18.8 HighCVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HLinux
3.17.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HCISA-ADP

Weaknesses

Affected Products

ProductVersions
LinuxLinux
  • 52edb2caf675684acf2140a125de4774c691fecd to before c7dc74ab7975c9b96284abfe4cca756d75fa4604Affected
  • 52edb2caf675684acf2140a125de4774c691fecd to before 10663ebec0ad5c78493a0dd34c9ee4d73d7ca0dfAffected
  • 52edb2caf675684acf2140a125de4774c691fecd to before 577a942df3de2666f6947bdd3a5c9e8d30073424Affected
LinuxLinux
  • 5.11Affected
  • before 5.11Not affected
  • 5.15.181 through 5.15.*Not affected
  • 5.18.3 through 5.18.*Not affected
  • 5.19 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.