{"id":"CVE-2021-47198","aliases":["CVE-2021-47198"],"related":[],"kind":"vulnerability","state":"published","title":"scsi: lpfc: Fix use-after-free in lpfc_unreg_rpi() routine","summary":"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().","summarySource":"cvelist","descriptions":[{"lang":"en","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().","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: scsi: lpfc: Fix use-after-free en la rutina lpfc_unreg_rpi() Se detecta un error con el siguiente reporte al descargar el driver: \"KASAN: use-after-free en lpfc_unreg_rpi +0x1b1b\" El NLP_REG_LOGIN_SEND nlp_flag está configurado en lpfc_reg_fab_ctrl_node(), pero el indicador no se borra al finalizar el inicio de sesión. Esto permite una segunda llamada a lpfc_unreg_rpi() para continuar con nlp_rpi configurado en LPFC_RPI_ALLOW_ERROR. Esto da como resultado un acceso de use after free cuando se usa como índice de matriz rpi_ids. Para solucionarlo, borre NLP_REG_LOGIN_SEND nlp_flag en lpfc_mbx_cmpl_fc_reg_login().","source":"nvd"}],"published":"2024-04-10T18:56:33.898Z","modified":"2026-06-17T04:16:53.440Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-416"],"affected":[{"ranges":[{"type":"git","introduced":"fe83e3b9b422ac8ece2359c7b7290efe7f0335a2","fixed":"dbebf865b3239595c1d4dba063b122862583b52a","status":"affected"},{"type":"git","introduced":"fe83e3b9b422ac8ece2359c7b7290efe7f0335a2","fixed":"79b20beccea3a3938a8500acef4e6b9d7c66142f","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.14","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.14","status":"unaffected"},{"type":"semver","introduced":"5.15.5","lastAffected":"5.15.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"5.16","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"5.14","fixed":"5.15.5"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/dbebf865b3239595c1d4dba063b122862583b52a","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/79b20beccea3a3938a8500acef4e6b9d7c66142f","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-09-10T15:50:04.933Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-47198","url":"https://www.cve.org/CVERecord?id=CVE-2021-47198","licence":"CVE Terms of Use","modified":"2026-05-11T13:49:52.614Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-47198","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-47198","licence":"Public domain","modified":"2026-06-17T04:16:53.440Z"}],"updatedAt":"2026-11-25T22:58:08.713Z","epss":{"score":0.00219,"percentile":0.13239,"date":"2026-12-01T12:00:22.000Z"}}