CVE-2022-50129

RDMA/srpt: Fix a use-after-free

HIGH
7.8
CVSS Score
Published: June 18, 2025 at 11:02 AM UTC
Updated: August 5, 2026 at 09:24 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
HIGH7.8
Exploit prediction
EPSS 0.2%

Description

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

Affected

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

3.3 ≤ v < 5.10.1373.3 ≤ v < 5.15.613.3 ≤ v < 5.18.183.3 ≤ v < 5.19.23.3 ≤ v < 6.05.11 ≤ v < 5.15.615.16 ≤ v < 5.18.185.19 ≤ v < 5.19.23.3a42d985bd5b234da8b61347a78dc3057bf7bb94d
Vendor states this is fixed in 388326bb1c32fcd09371c1d494af71471ef3a04b (fixed)
Vendor states this is fixed in 4ee8c39968a648d58b273582d4b021044a41ee5e (fixed)
Vendor states this is fixed in b5605148e6ce36bb21020d49010b617693933128 (fixed)
Vendor states this is fixed in de95b52d9aabc979166aba81ccbe623aaf9c16a1 (fixed)
Vendor states this is fixed in e60d7e2462bf57273563c4e00dbfa79ee973b9e2 (fixed)
Vendor states this is fixed in 3.3 (unaffected)
Vendor states this is fixed in 5.10.137 (unaffected)
Vendor states this is fixed in 5.15.61 (unaffected)
Vendor states this is fixed in 5.18.18 (unaffected)
Vendor states this is fixed in 5.19.2 (unaffected)
Vendor states this is fixed in 6.0 (unaffected)

References (5)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/388326bb1c32fcd09371c1d494af71471ef3a04b
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/4ee8c39968a648d58b273582d4b021044a41ee5e
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/b5605148e6ce36bb21020d49010b617693933128
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/de95b52d9aabc979166aba81ccbe623aaf9c16a1
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/e60d7e2462bf57273563c4e00dbfa79ee973b9e2

CVSS

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

Quick Info

StatusMODIFIED
CWE
CWE-416

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