Bug 2363399 (CVE-2022-49780) - CVE-2022-49780 kernel: scsi: target: tcm_loop: Fix possible name leak in tcm_loop_setup_hba_bus()
Summary: CVE-2022-49780 kernel: scsi: target: tcm_loop: Fix possible name leak in tcm_...
Keywords:
Status: NEW
Alias: CVE-2022-49780
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-05-01 15:03 UTC by OSIDB Bzimport
Modified: 2025-06-06 01:59 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-05-01 15:03:20 UTC
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.

Comment 1 Avinash Hanwate 2025-05-02 04:43:51 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025050119-CVE-2022-49780-e1de@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.