{"id":"CVE-2022-49535","state":"PUBLISHED","title":"scsi: lpfc: Fix null pointer dereference after failing to issue FLOGI and PLOGI","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nscsi: lpfc: Fix null pointer dereference after failing to issue FLOGI and PLOGI\n\nIf lpfc_issue_els_flogi() fails and returns non-zero status, the node\nreference count is decremented to trigger the release of the nodelist\nstructure. However, if there is a prior registration or dev-loss-evt work\npending, the node may be released prematurely.  When dev-loss-evt\ncompletes, the released node is referenced causing a use-after-free null\npointer dereference.\n\nSimilarly, when processing non-zero ELS PLOGI completion status in\nlpfc_cmpl_els_plogi(), the ndlp flags are checked for a transport\nregistration before triggering node removal.  If dev-loss-evt work is\npending, the node may be released prematurely and a subsequent call to\nlpfc_dev_loss_tmo_handler() results in a use after free ndlp dereference.\n\nAdd test for pending dev-loss before decrementing the node reference count\nfor FLOGI, PLOGI, PRLI, and ADISC handling.","publishedAt":"2025-02-26T02:13:53.482Z","updatedAt":"2026-08-05T08:55:30.049Z","severity":{"score":8.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"52edb2caf675684acf2140a125de4774c691fecd","status":"affected","lessThan":"c7dc74ab7975c9b96284abfe4cca756d75fa4604","versionType":"git"},{"version":"52edb2caf675684acf2140a125de4774c691fecd","status":"affected","lessThan":"10663ebec0ad5c78493a0dd34c9ee4d73d7ca0df","versionType":"git"},{"version":"52edb2caf675684acf2140a125de4774c691fecd","status":"affected","lessThan":"577a942df3de2666f6947bdd3a5c9e8d30073424","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/scsi/lpfc/lpfc_els.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.11","versionType":"semver"},{"version":"5.15.181","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"5.18.3","status":"unaffected","lessThanOrEqual":"5.18.*","versionType":"semver"},{"version":"5.19","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/scsi/lpfc/lpfc_els.c"]}],"references":["https://git.kernel.org/stable/c/c7dc74ab7975c9b96284abfe4cca756d75fa4604","https://git.kernel.org/stable/c/10663ebec0ad5c78493a0dd34c9ee4d73d7ca0df","https://git.kernel.org/stable/c/577a942df3de2666f6947bdd3a5c9e8d30073424"],"weaknesses":["CWE-416"],"ingestedAt":"2026-10-29T20:05:26.763Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/49xxx/CVE-2022-49535.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-49535","state":"PUBLISHED","datePublished":"2025-02-26T02:13:53.482Z","dateUpdated":"2026-08-05T08:55:30.049Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-02-26T02:08:31.589Z"},"containers":{"cna":{"title":"scsi: lpfc: Fix null pointer dereference after failing to issue FLOGI and PLOGI","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nscsi: lpfc: Fix null pointer dereference after failing to issue FLOGI and PLOGI\n\nIf lpfc_issue_els_flogi() fails and returns non-zero status, the node\nreference count is decremented to trigger the release of the nodelist\nstructure. However, if there is a prior registration or dev-loss-evt work\npending, the node may be released prematurely.  When dev-loss-evt\ncompletes, the released node is referenced causing a use-after-free null\npointer dereference.\n\nSimilarly, when processing non-zero ELS PLOGI completion status in\nlpfc_cmpl_els_plogi(), the ndlp flags are checked for a transport\nregistration before triggering node removal.  If dev-loss-evt work is\npending, the node may be released prematurely and a subsequent call to\nlpfc_dev_loss_tmo_handler() results in a use after free ndlp dereference.\n\nAdd test for pending dev-loss before decrementing the node reference count\nfor FLOGI, PLOGI, PRLI, and ADISC handling."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"52edb2caf675684acf2140a125de4774c691fecd","status":"affected","lessThan":"c7dc74ab7975c9b96284abfe4cca756d75fa4604","versionType":"git"},{"version":"52edb2caf675684acf2140a125de4774c691fecd","status":"affected","lessThan":"10663ebec0ad5c78493a0dd34c9ee4d73d7ca0df","versionType":"git"},{"version":"52edb2caf675684acf2140a125de4774c691fecd","status":"affected","lessThan":"577a942df3de2666f6947bdd3a5c9e8d30073424","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/scsi/lpfc/lpfc_els.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.11","versionType":"semver"},{"version":"5.15.181","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"5.18.3","status":"unaffected","lessThanOrEqual":"5.18.*","versionType":"semver"},{"version":"5.19","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/scsi/lpfc/lpfc_els.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/c7dc74ab7975c9b96284abfe4cca756d75fa4604"},{"url":"https://git.kernel.org/stable/c/10663ebec0ad5c78493a0dd34c9ee4d73d7ca0df"},{"url":"https://git.kernel.org/stable/c/577a942df3de2666f6947bdd3a5c9e8d30073424"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","baseScore":8.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:A - The UAF is reached via Fibre Channel ELS FLOGI/PLOGI/PRLI/ADISC failure handling in the lpfc HBA driver; a peer on the same FC/FCoE SAN fabric can induce PLOGI/PRLI/ADISC rejects and rport loss, which is adjacent topology rather than a routable IP network.\nAC:L - An adjacent fabric attacker controls both sides of the race—causing rport loss to set NLP_IN_DEV_LOSS (default ~30s window) and rejecting rediscovery PLOGI/PRLI/ADISC—so premature ndlp release is reliably inducable without uncontrollable memory-layout conditions.\nPR:N - ELS completions and FC transport dev_loss callbacks run in HBA/worker context with no host authentication; a SAN fabric peer needs no credentials or capabilities on the victim system.\nUI:N - Discovery, ELS completion, and queued LPFC_EVT_DEV_LOSS handling run automatically during normal fabric operation; no local user action such as mounting or opening a device is required.\nS:U - The corruption is confined to the host kernel's lpfc ndlp mempool/heap within the same OS security authority; there is no VM escape, IOMMU/DMA bypass, or sandbox boundary crossing.\nC:H - This is a use-after-free of an ndlp returned to a kmalloc-backed mempool; reclaim of the freed object enables heap-spray-assisted arbitrary read, and UAF guidance scores confidentiality High.\nI:H - Post-free use in lpfc_dev_loss_tmo_handler on a reclaimed ndlp enables heap corruption and control-flow hijack primitives (write/UAF exploitation), so integrity impact is High per UAF guidance.\nA:H - Premature free followed by the pending DEV_LOSS handler yields a use-after-free null pointer dereference/oops (or worse under exploitation), which is a full kernel availability loss."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T08:55:30.049Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.11","versionEndExcluding":"5.15.181"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.11","versionEndExcluding":"5.18.3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.11","versionEndExcluding":"5.19"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":7.8,"attackVector":"LOCAL","baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","integrityImpact":"HIGH","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"LOW","confidentialityImpact":"HIGH"}},{"other":{"type":"ssvc","content":{"id":"CVE-2022-49535","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2025-02-27T18:15:34.195435Z"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-416","lang":"en","type":"CWE","description":"CWE-416 Use After Free"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2025-02-27T18:22:31.809Z"}}]}}}