# CVE-2021-47045: scsi: lpfc: Fix null pointer dereference in lpfc_prep_els_iocb()

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.24%, higher than 16% of CVEs (2026-12-01)
- Published: 2024-02-28T08:13:49.708Z
- Modified: 2026-06-17T04:16:17.883Z
- Weaknesses: CWE-476
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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

scsi: lpfc: Fix null pointer dereference in lpfc_prep_els_iocb()

It is possible to call lpfc_issue_els_plogi() passing a did for which no
matching ndlp is found. A call is then made to lpfc_prep_els_iocb() with a
null pointer to a lpfc_nodelist structure resulting in a null pointer
dereference.

Fix by returning an error status if no valid ndlp is found. Fix up comments
regarding ndlp reference counting.

(As written by CVE List.)

## Affected

- Linux Linux: from 4430f7fd09ecb037570119e0aacbf0c17b8f98b2 before a09677de458d500b00701f6036baa423d9995408; from 4430f7fd09ecb037570119e0aacbf0c17b8f98b2 before 9bdcfbed2a9fe24d2c7eaa1bad7c705e18de8cc7; from 4430f7fd09ecb037570119e0aacbf0c17b8f98b2 before 8dd1c125f7f838abad009b64bff5f0a11afe3cb6; 5.11 (not affected: before 5.11; from 5.11.21 up to 5.11.*; from 5.12.4 up to 5.12.*; from 5.13 up to *)
- linux linux_kernel: from 5.11 before 5.11.21; from 5.12 before 5.12.4

## References

- <https://git.kernel.org/stable/c/a09677de458d500b00701f6036baa423d9995408> (patch)
- <https://git.kernel.org/stable/c/9bdcfbed2a9fe24d2c7eaa1bad7c705e18de8cc7> (patch)
- <https://git.kernel.org/stable/c/8dd1c125f7f838abad009b64bff5f0a11afe3cb6> (patch)

## Sources

- CVE List: [CVE-2021-47045](https://www.cve.org/CVERecord?id=CVE-2021-47045), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2021-47045](https://nvd.nist.gov/vuln/detail/CVE-2021-47045), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-47045 · Whole record: https://cve.day/CVE-2021-47045.json · Rebuilt by cve.day 2026-11-25T22:58:08.633Z
