{"id":"CVE-2022-50827","summary":"scsi: lpfc: Fix memory leak in lpfc_create_port()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nscsi: lpfc: Fix memory leak in lpfc_create_port()\n\nCommit 5e633302ace1 (\"scsi: lpfc: vmid: Add support for VMID in mailbox\ncommand\") introduced allocations for the VMID resources in\nlpfc_create_port() after the call to scsi_host_alloc(). Upon failure on the\nVMID allocations, the new code would branch to the 'out' label, which\nreturns NULL without unwinding anything, thus skipping the call to\nscsi_host_put().\n\nFix the problem by creating a separate label 'out_free_vmid' to unwind the\nVMID resources and make the 'out_put_shost' label call only\nscsi_host_put(), as was done before the introduction of allocations for\nVMID.","modified":"2026-04-02T08:28:46.814579Z","published":"2025-12-30T12:08:39.669Z","related":["SUSE-SU-2026:0263-1","SUSE-SU-2026:0317-1","SUSE-SU-2026:0350-1","SUSE-SU-2026:0369-1","SUSE-SU-2026:0411-1","SUSE-SU-2026:0617-1"],"database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50827.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/5ea1f195f51c2bb5915ccfb2b2885ca81ce9262b"},{"type":"WEB","url":"https://git.kernel.org/stable/c/9749595feb33a1a2b848800192224ffeed5346b4"},{"type":"WEB","url":"https://git.kernel.org/stable/c/dc8e483f684a24cc06e1d5fa958b54db58855093"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50827.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50827"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"5e633302ace1f61f8ea5a3ce21e19a4d79126cca"},{"fixed":"9749595feb33a1a2b848800192224ffeed5346b4"},{"fixed":"5ea1f195f51c2bb5915ccfb2b2885ca81ce9262b"},{"fixed":"dc8e483f684a24cc06e1d5fa958b54db58855093"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50827.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.14.0"},{"fixed":"5.15.76"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"6.0.6"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50827.json"}}],"schema_version":"1.7.5"}