Bug 2347908 (CVE-2022-49535) - CVE-2022-49535 kernel: scsi: lpfc: Fix null pointer dereference after failing to issue FLOGI and PLOGI
Summary: CVE-2022-49535 kernel: scsi: lpfc: Fix null pointer dereference after failing...
Keywords:
Status: NEW
Alias: CVE-2022-49535
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-02-26 03:10 UTC by OSIDB Bzimport
Modified: 2025-05-12 13:55 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-02-26 03:10:57 UTC
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.

Comment 1 Avinash Hanwate 2025-02-26 13:38:13 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025022613-CVE-2022-49535-0abf@gregkh/T

Comment 4 Avinash Hanwate 2025-02-26 17:44:56 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025022613-CVE-2022-49535-0abf@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.