# CVE-2022-50129: RDMA/srpt: Fix a use-after-free

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.0
- **CVSS:** 7.0 (v3.1, CNA) `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: High; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.28% (percentile 13, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2025-06-18T11:02:55.576Z
- **Modified:** 2026-08-05T08:57:28.156Z

## Who should check

- Anyone running Linux \>= a42d985bd5b234da8b61347a78dc3057bf7bb94d, \< de95b52d9aabc979166aba81ccbe623aaf9c16a1; \>= a42d985bd5b234da8b61347a78dc3057bf7bb94d, \< e60d7e2462bf57273563c4e00dbfa79ee973b9e2; \>= a42d985bd5b234da8b61347a78dc3057bf7bb94d, \< 4ee8c39968a648d58b273582d4b021044a41ee5e; \>= a42d985bd5b234da8b61347a78dc3057bf7bb94d, \< 388326bb1c32fcd09371c1d494af71471ef3a04b; \>= a42d985bd5b234da8b61347a78dc3057bf7bb94d, \< b5605148e6ce36bb21020d49010b617693933128
- Anyone running Linux 3.3

## 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 and fixed versions

- Linux: \>= a42d985bd5b234da8b61347a78dc3057bf7bb94d, \< de95b52d9aabc979166aba81ccbe623aaf9c16a1; \>= a42d985bd5b234da8b61347a78dc3057bf7bb94d, \< e60d7e2462bf57273563c4e00dbfa79ee973b9e2; \>= a42d985bd5b234da8b61347a78dc3057bf7bb94d, \< 4ee8c39968a648d58b273582d4b021044a41ee5e; \>= a42d985bd5b234da8b61347a78dc3057bf7bb94d, \< 388326bb1c32fcd09371c1d494af71471ef3a04b; \>= a42d985bd5b234da8b61347a78dc3057bf7bb94d, \< b5605148e6ce36bb21020d49010b617693933128 (cvelist)
- Linux: 3.3 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-50129. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-50129.md
Affected: Linux >= a42d985bd5b234da8b61347a78dc3057bf7bb94d, < de95b52d9aabc979166aba81ccbe623aaf9c16a1; >= a42d985bd5b234da8b61347a78dc3057bf7bb94d, < e60d7e2462bf57273563c4e00dbfa79ee973b9e2; >= a42d985bd5b234da8b61347a78dc3057bf7bb94d, < 4ee8c39968a648d58b273582d4b021044a41ee5e; >= a42d985bd5b234da8b61347…
Fixed in: Linux 4ee8c39968a648d58b273582d4b021044a41ee5e, Linux 388326bb1c32fcd09371c1d494af71471ef3a04b

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-50129 being exploited?

There is no confirmed exploitation: CVE-2022-50129 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.28% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-50129?

High: CVSS 7.0 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2022-50129?

Linux \>= a42d985bd5b234da8b61347a78dc3057bf7bb94d, \< de95b52d9aabc979166aba81ccbe623aaf9c16a1; \>= a42d985bd5b234da8b61347a78dc3057bf7bb94d, \< e60d7e2462bf57273563c4e00dbfa79ee973b9e2; \>= a42d985bd5b234da8b61347a78dc3057bf7bb94d, \< 4ee8c39968a648d58b273582d4b021044a41ee5e; \>= a42d985bd5b234da8b61347a78dc3057bf7bb94d, \< 388326bb1c32fcd09371c1d494af71471ef3a04b; \>= a42d985bd5b234da8b61347a78dc3057bf7bb94d, \< b5605148e6ce36bb21020d49010b617693933128; Linux 3.3.

### Is there a fix for CVE-2022-50129?

Yes. Fixed in Linux 4ee8c39968a648d58b273582d4b021044a41ee5e, Linux 388326bb1c32fcd09371c1d494af71471ef3a04b. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2022-50129?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/de95b52d9aabc979166aba81ccbe623aaf9c16a1>
- patch: <https://git.kernel.org/stable/c/e60d7e2462bf57273563c4e00dbfa79ee973b9e2>
- patch: <https://git.kernel.org/stable/c/4ee8c39968a648d58b273582d4b021044a41ee5e>
- patch: <https://git.kernel.org/stable/c/388326bb1c32fcd09371c1d494af71471ef3a04b>
- patch: <https://git.kernel.org/stable/c/b5605148e6ce36bb21020d49010b617693933128>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-50129>

HTML: <https://flawdb.com/CVE-2022-50129> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-50129>
