CVE-2022-49535 scsi: lpfc: Fix null pointer dereference after failing to issue FLOGI and PLOGI
A use-after-free vulnerability in the Linux kernel's lpfc driver allows local attackers to cause a system crash via null pointer dereference.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2022-49535?
CVE-2022-49535 is a high-severity use after free vulnerability in Linux kernel, published on 26 Feb 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Official 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.
Weakness: CWE-416
Which versions are affected by CVE-2022-49535?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2022-49535?
Apply the vendor's patch.
Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.
Is CVE-2022-49535 being exploited?
There is no known exploitation of CVE-2022-49535 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as AZL-58986, DEBIAN-CVE-2022-49535, GHSA-84hr-q2hc-2m5c, ROOT-OS-DEBIAN-11-CVE-2022-49535, ROOT-OS-UBUNTU-2204-CVE-2022-49535, UBUNTU-CVE-2022-49535.