CVE-2022-50129

Severity CVSS v4.0:
Pending analysis
Type:
CWE-416 Use After Free
Publication date:
18/06/2025
Last modified:
18/11/2025

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> RDMA/srpt: Fix a use-after-free<br /> <br /> Change the LIO port members inside struct srpt_port from regular members<br /> into pointers. Allocate the LIO port data structures from inside<br /> srpt_make_tport() and free these from inside srpt_make_tport(). Keep<br /> struct srpt_device as long as either an RDMA port or a LIO target port is<br /> associated with it. This patch decouples the lifetime of struct srpt_port<br /> (controlled by the RDMA core) and struct srpt_port_id (controlled by LIO).<br /> This patch fixes the following KASAN complaint:<br /> <br /> BUG: KASAN: use-after-free in srpt_enable_tpg+0x31/0x70 [ib_srpt]<br /> Read of size 8 at addr ffff888141cc34b8 by task check/5093<br /> <br /> Call Trace:<br /> <br /> show_stack+0x4e/0x53<br /> dump_stack_lvl+0x51/0x66<br /> print_address_description.constprop.0.cold+0xea/0x41e<br /> print_report.cold+0x90/0x205<br /> kasan_report+0xb9/0xf0<br /> __asan_load8+0x69/0x90<br /> srpt_enable_tpg+0x31/0x70 [ib_srpt]<br /> target_fabric_tpg_base_enable_store+0xe2/0x140 [target_core_mod]<br /> configfs_write_iter+0x18b/0x210<br /> new_sync_write+0x1f2/0x2f0<br /> vfs_write+0x3e3/0x540<br /> ksys_write+0xbb/0x140<br /> __x64_sys_write+0x42/0x50<br /> do_syscall_64+0x34/0x80<br /> entry_SYSCALL_64_after_hwframe+0x46/0xb0<br />

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 3.3 (including) 5.10.137 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.11 (including) 5.15.61 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.16 (including) 5.18.18 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.19 (including) 5.19.2 (excluding)