CVE-2022-50134

RDMA/hfi1: fix potential memory leak in setup_base_ctxt()

MEDIUM
5.5
CVSS Score
Published: June 18, 2025 at 11:02 AM UTC
Updated: June 17, 2026 at 05:22 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.3%

Description

In the Linux kernel, the following vulnerability has been resolved: RDMA/hfi1: fix potential memory leak in setup_base_ctxt() setup_base_ctxt() allocates a memory chunk for uctxt->groups with hfi1_alloc_ctxt_rcv_groups(). When init_user_ctxt() fails, uctxt->groups is not released, which will lead to a memory leak. We should release the uctxt->groups with hfi1_free_ctxt_rcv_groups() when init_user_ctxt() fails.

Affected

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

4.14 ≤ v < 4.14.2914.14 ≤ v < 4.19.2564.14 ≤ v < 5.10.1374.14 ≤ v < 5.15.614.14 ≤ v < 5.18.184.14 ≤ v < 5.19.24.14 ≤ v < 5.4.2114.14 ≤ v < 6.04.15 ≤ v < 4.19.2564.20 ≤ v < 5.4.2115.11 ≤ v < 5.15.615.16 ≤ v < 5.18.185.19 ≤ v < 5.19.25.5 ≤ v < 5.10.1374.14e87473bc1b6c2cb08f1b760cfc8cd012822241a6
Vendor states this is fixed in 1750be1e9f18787cf717c24dbc5fa029fc372a22 (fixed)
Vendor states this is fixed in 2f90813f1c21c3d780585390af961bd17c8515ae (fixed)
Vendor states this is fixed in 90ef48a718f88935d4af53d7dadd1ceafe103ce6 (fixed)
Vendor states this is fixed in a85c7dd1edadcdeca24e603a6618153a3bcc81ca (fixed)
Vendor states this is fixed in a9055dfe437efae77e28e57205437c878a03ccb7 (fixed)
Vendor states this is fixed in aa2a1df3a2c85f855af7d54466ac10bd48645d63 (fixed)
Vendor states this is fixed in e25b828553aecb3185a8d8d0c4f9b4e133fb5db6 (fixed)
Vendor states this is fixed in fc4de8009fd6c2ca51986c6757efa964040e7d02 (fixed)
Vendor states this is fixed in 4.14 (unaffected)
Vendor states this is fixed in 4.14.291 (unaffected)
Vendor states this is fixed in 4.19.256 (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 5.4.211 (unaffected)
Vendor states this is fixed in 6.0 (unaffected)

References (8)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/1750be1e9f18787cf717c24dbc5fa029fc372a22
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/2f90813f1c21c3d780585390af961bd17c8515ae
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/90ef48a718f88935d4af53d7dadd1ceafe103ce6
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/a85c7dd1edadcdeca24e603a6618153a3bcc81ca
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/a9055dfe437efae77e28e57205437c878a03ccb7
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/aa2a1df3a2c85f855af7d54466ac10bd48645d63
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/e25b828553aecb3185a8d8d0c4f9b4e133fb5db6
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/fc4de8009fd6c2ca51986c6757efa964040e7d02

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