{"id":"CVE-2022-49780","state":"PUBLISHED","title":"scsi: target: tcm_loop: Fix possible name leak in tcm_loop_setup_hba_bus()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nscsi: target: tcm_loop: Fix possible name leak in tcm_loop_setup_hba_bus()\n\nIf device_register() fails in tcm_loop_setup_hba_bus(), the name allocated\nby dev_set_name() need be freed. As comment of device_register() says, it\nshould use put_device() to give up the reference in the error path. So fix\nthis by calling put_device(), then the name can be freed in kobject_cleanup().\nThe 'tl_hba' will be freed in tcm_loop_release_adapter(), so it don't need\ngoto error label in this case.","publishedAt":"2025-05-01T14:09:15.135Z","updatedAt":"2026-05-11T19:06:38.266Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"3703b2c5d041a68095cdd22380c23ce27d449ad7","status":"affected","lessThan":"41a6b8b527a5957fab41c3c05e25ad125268e2e9","versionType":"git"},{"version":"3703b2c5d041a68095cdd22380c23ce27d449ad7","status":"affected","lessThan":"28f7ff5e7559d226e63c7c5de74eb075a83d8c53","versionType":"git"},{"version":"3703b2c5d041a68095cdd22380c23ce27d449ad7","status":"affected","lessThan":"75205f1b47a88c3fac4f30bd7567e89b2887c7fd","versionType":"git"},{"version":"3703b2c5d041a68095cdd22380c23ce27d449ad7","status":"affected","lessThan":"a636772988bafab89278e7bb3420d8e8eacfe912","versionType":"git"},{"version":"3703b2c5d041a68095cdd22380c23ce27d449ad7","status":"affected","lessThan":"dce0589a3faec9e2e543e97bca7e62592ec85585","versionType":"git"},{"version":"3703b2c5d041a68095cdd22380c23ce27d449ad7","status":"affected","lessThan":"bc68e428d4963af0201e92159629ab96948f0893","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/target/loopback/tcm_loop.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.39","status":"affected"},{"version":"0","status":"unaffected","lessThan":"2.6.39","versionType":"semver"},{"version":"4.19.267","status":"unaffected","lessThanOrEqual":"4.19.*","versionType":"semver"},{"version":"5.4.225","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.156","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.80","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.0.10","status":"unaffected","lessThanOrEqual":"6.0.*","versionType":"semver"},{"version":"6.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/target/loopback/tcm_loop.c"]}],"references":["https://git.kernel.org/stable/c/41a6b8b527a5957fab41c3c05e25ad125268e2e9","https://git.kernel.org/stable/c/28f7ff5e7559d226e63c7c5de74eb075a83d8c53","https://git.kernel.org/stable/c/75205f1b47a88c3fac4f30bd7567e89b2887c7fd","https://git.kernel.org/stable/c/a636772988bafab89278e7bb3420d8e8eacfe912","https://git.kernel.org/stable/c/dce0589a3faec9e2e543e97bca7e62592ec85585","https://git.kernel.org/stable/c/bc68e428d4963af0201e92159629ab96948f0893"],"weaknesses":[],"ingestedAt":"2026-10-29T20:05:26.763Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/49xxx/CVE-2022-49780.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-49780","state":"PUBLISHED","datePublished":"2025-05-01T14:09:15.135Z","dateUpdated":"2026-05-11T19:06:38.266Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T07:17:33.806Z"},"containers":{"cna":{"title":"scsi: target: tcm_loop: Fix possible name leak in tcm_loop_setup_hba_bus()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nscsi: target: tcm_loop: Fix possible name leak in tcm_loop_setup_hba_bus()\n\nIf device_register() fails in tcm_loop_setup_hba_bus(), the name allocated\nby dev_set_name() need be freed. As comment of device_register() says, it\nshould use put_device() to give up the reference in the error path. So fix\nthis by calling put_device(), then the name can be freed in kobject_cleanup().\nThe 'tl_hba' will be freed in tcm_loop_release_adapter(), so it don't need\ngoto error label in this case."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"3703b2c5d041a68095cdd22380c23ce27d449ad7","status":"affected","lessThan":"41a6b8b527a5957fab41c3c05e25ad125268e2e9","versionType":"git"},{"version":"3703b2c5d041a68095cdd22380c23ce27d449ad7","status":"affected","lessThan":"28f7ff5e7559d226e63c7c5de74eb075a83d8c53","versionType":"git"},{"version":"3703b2c5d041a68095cdd22380c23ce27d449ad7","status":"affected","lessThan":"75205f1b47a88c3fac4f30bd7567e89b2887c7fd","versionType":"git"},{"version":"3703b2c5d041a68095cdd22380c23ce27d449ad7","status":"affected","lessThan":"a636772988bafab89278e7bb3420d8e8eacfe912","versionType":"git"},{"version":"3703b2c5d041a68095cdd22380c23ce27d449ad7","status":"affected","lessThan":"dce0589a3faec9e2e543e97bca7e62592ec85585","versionType":"git"},{"version":"3703b2c5d041a68095cdd22380c23ce27d449ad7","status":"affected","lessThan":"bc68e428d4963af0201e92159629ab96948f0893","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/target/loopback/tcm_loop.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.39","status":"affected"},{"version":"0","status":"unaffected","lessThan":"2.6.39","versionType":"semver"},{"version":"4.19.267","status":"unaffected","lessThanOrEqual":"4.19.*","versionType":"semver"},{"version":"5.4.225","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.156","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.80","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.0.10","status":"unaffected","lessThanOrEqual":"6.0.*","versionType":"semver"},{"version":"6.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/target/loopback/tcm_loop.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/41a6b8b527a5957fab41c3c05e25ad125268e2e9"},{"url":"https://git.kernel.org/stable/c/28f7ff5e7559d226e63c7c5de74eb075a83d8c53"},{"url":"https://git.kernel.org/stable/c/75205f1b47a88c3fac4f30bd7567e89b2887c7fd"},{"url":"https://git.kernel.org/stable/c/a636772988bafab89278e7bb3420d8e8eacfe912"},{"url":"https://git.kernel.org/stable/c/dce0589a3faec9e2e543e97bca7e62592ec85585"},{"url":"https://git.kernel.org/stable/c/bc68e428d4963af0201e92159629ab96948f0893"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T19:06:38.266Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.39","versionEndExcluding":"4.19.267"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.39","versionEndExcluding":"5.4.225"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.39","versionEndExcluding":"5.10.156"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.39","versionEndExcluding":"5.15.80"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.39","versionEndExcluding":"6.0.10"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.39","versionEndExcluding":"6.1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}