{"id":"CVE-2021-47198","published":"2024-04-10T18:56:33Z","modified":"2026-05-11T13:49:52Z","title":"scsi: lpfc: Fix use-after-free in lpfc_unreg_rpi() routine","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\nscsi: lpfc: Fix use-after-free in lpfc_unreg_rpi() routine\n\nAn error is detected with the following report when unloading the driver:\n  \"KASAN: use-after-free in lpfc_unreg_rpi+0x1b1b\"\n\nThe NLP_REG_LOGIN_SEND nlp_flag is set in lpfc_reg_fab_ctrl_node(), but the\nflag is not cleared upon completion of the login.\n\nThis allows a second call to lpfc_unreg_rpi() to proceed with nlp_rpi set\nto LPFC_RPI_ALLOW_ERROR.  This results in a use after free access when used\nas an rpi_ids array index.\n\nFix by clearing the NLP_REG_LOGIN_SEND nlp_flag in\nlpfc_mbx_cmpl_fc_reg_login().","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.00307,"percentile":0.1603,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/dbebf865b3239595c1d4dba063b122862583b52a","tags":[]},{"url":"https://git.kernel.org/stable/c/79b20beccea3a3938a8500acef4e6b9d7c66142f","tags":[]}],"priority":{"score":3.2,"factors":[{"name":"EPSS percentile","points":3.21}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= fe83e3b9b422ac8ece2359c7b7290efe7f0335a2, < dbebf865b3239595c1d4dba063b122862583b52a",">= fe83e3b9b422ac8ece2359c7b7290efe7f0335a2, < 79b20beccea3a3938a8500acef4e6b9d7c66142f"]},{"vendor":"Linux","product":"Linux","versions":["5.14"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-09-10T15:50:04.933351Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2021-33846","exploited":false,"provenance":"source"}}