CVE-2022-49780

scsi: target: tcm_loop: Fix possible name leak in tcm_loop_setup_hba_bus()

MEDIUM
5.5
CVSS Score
Published: May 1, 2025 at 02:09 PM UTC
Updated: June 17, 2026 at 05:19 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%

Description

In the Linux kernel, the following vulnerability has been resolved: scsi: target: tcm_loop: Fix possible name leak in tcm_loop_setup_hba_bus() If device_register() fails in tcm_loop_setup_hba_bus(), the name allocated by dev_set_name() need be freed. As comment of device_register() says, it should use put_device() to give up the reference in the error path. So fix this by calling put_device(), then the name can be freed in kobject_cleanup(). The 'tl_hba' will be freed in tcm_loop_release_adapter(), so it don't need goto error label in this case.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

2.6.39 ≤ v < 4.19.2672.6.39 ≤ v < 5.10.1562.6.39 ≤ v < 5.15.802.6.39 ≤ v < 5.4.2252.6.39 ≤ v < 6.0.102.6.39 ≤ v < 6.14.20 ≤ v < 5.4.2255.11 ≤ v < 5.15.805.16 ≤ v < 6.0.105.5 ≤ v < 5.10.1562.6.393703b2c5d041a68095cdd22380c23ce27d449ad76.1 rc16.1 rc26.1 rc36.1 rc46.1 rc5
Vendor states this is fixed in 28f7ff5e7559d226e63c7c5de74eb075a83d8c53 (fixed)
Vendor states this is fixed in 41a6b8b527a5957fab41c3c05e25ad125268e2e9 (fixed)
Vendor states this is fixed in 75205f1b47a88c3fac4f30bd7567e89b2887c7fd (fixed)
Vendor states this is fixed in a636772988bafab89278e7bb3420d8e8eacfe912 (fixed)
Vendor states this is fixed in bc68e428d4963af0201e92159629ab96948f0893 (fixed)
Vendor states this is fixed in dce0589a3faec9e2e543e97bca7e62592ec85585 (fixed)
Vendor states this is fixed in 2.6.39 (unaffected)
Vendor states this is fixed in 4.19.267 (unaffected)
Vendor states this is fixed in 5.10.156 (unaffected)
Vendor states this is fixed in 5.15.80 (unaffected)
Vendor states this is fixed in 5.4.225 (unaffected)
Vendor states this is fixed in 6.0.10 (unaffected)
Vendor states this is fixed in 6.1 (unaffected)

References (6)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/28f7ff5e7559d226e63c7c5de74eb075a83d8c53
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/41a6b8b527a5957fab41c3c05e25ad125268e2e9
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/75205f1b47a88c3fac4f30bd7567e89b2887c7fd
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/a636772988bafab89278e7bb3420d8e8eacfe912
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/bc68e428d4963af0201e92159629ab96948f0893
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/dce0589a3faec9e2e543e97bca7e62592ec85585

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
CWE-401

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card