CVE-2022-49535·Kernel vulnerability
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.
- Severity
- high
- Software
- Kernel
- Fixed in
- 5.18.3
- Published
- 2025-02-26
Affected versions
From: 5.16
Until: 5.18.3
Fixed in: 5.18.3
How to fix this CVE
Update your Linux kernel to version 5.18.3 or later to resolve a critical null pointer dereference vulnerability in the lpfc SCSI driver. This vulnerability occurs when FLOGI or PLOGI commands fail and pending device-loss timeout work is scheduled, leading to premature node structure release and use-after-free conditions. Immediate kernel patching is recommended for systems running affected versions 5.16 through 5.18.2.
sudo dnf update kernel kernel-headersDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check installed kernel version with 'uname -r' and compare against affected range 5.16.x to 5.18.2
- Step 2: Verify lpfc driver is loaded with 'lsmod | grep lpfc' to determine if Fibre Channel SCSI subsystem is in use
- Step 3: Search kernel logs for null pointer dereference patterns with 'grep -i 'NULL pointer\|use after free\|lpfc' /var/log/kern.log | tail -50'
- Step 4: After patching, confirm kernel version updated with 'uname -r' and reboot if necessary to load patched kernel
FAQ
What is CVE-2022-49535?
CVE-2022-49535 is a use-after-free vulnerability in the Linux kernel's lpfc SCSI driver where device-loss timeout work scheduled before FLOGI/PLOGI command failures causes premature release of nodelist structures, resulting in null pointer dereferences when the deferred work attempts to access the freed node.
Is CVE-2022-49535 being actively exploited?
No, CVE-2022-49535 is not listed in CISA's Known Exploited Vulnerabilities catalog and no public exploits are known, though the vulnerability could trigger denial of service through kernel crashes on affected systems.
What versions of Kernel are affected by CVE-2022-49535?
Linux kernel versions 5.16.x through 5.18.2 are affected. Version 5.18.3 and later contain the fix.
How do I check if my server is vulnerable to CVE-2022-49535?
Run 'uname -r' to check your kernel version; if it shows 5.16.x through 5.18.2 and 'lsmod | grep lpfc' returns results, your system is vulnerable and requires updating.
Does Defensia detect CVE-2022-49535?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Kernel is installed on a monitored server, CVE-2022-49535 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2022-49535. Free for 1 server.
Get started free