Description
In the Linux kernel, the following vulnerability has been resolved:

RDMA/mlx5: Fix memory leak in GET_DATA_DIRECT_SYSFS_PATH handler

The UVERBS_HANDLER(MLX5_IB_METHOD_GET_DATA_DIRECT_SYSFS_PATH) function
allocates memory for the device path using kobject_get_path(). If the
length of the device path exceeds the output buffer length, the function
returns -ENOSPC but does not free the allocated memory, resulting in a
memory leak.

Add a kfree() call to the error path to ensure the allocated memory is
properly freed.

Compile tested only. Issue found using a prototype static analysis tool
and code review.
Published: 2026-05-27
Score: n/a
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

In the Linux kernel, the GET_DATA_DIRECT_SYSFS_PATH handler in the RDMA/mlx5 driver allocates memory for a device path using kobject_get_path(). When the path length exceeds the output buffer, the function returns -ENOSPC but leaves the allocated memory unfreed, creating a memory leak. Over time, repeated invocations of this path can consume kernel memory, eventually leading to resource exhaustion and a potential denial of service. This flaw represents a classic resource management weakness and is classified as a memory leak (CWE-401).

Affected Systems

All Linux kernel implementations that include the RDMA/mellanox mlx5 driver prior to the posted fix. Because the affected code originates in the mainline kernel, any derivative release that has not applied the patch is presumed vulnerable. Users of RDMA uverbs utilities that interact with the kernel’s GET_DATA_DIRECT_SYSFS_PATH interface, such as rdma-core tools, may expose the kernel to the leak if they generate errors. The vendor also lists the Linux kernel as the affected product, with no specific version delimiters, so the entire vulnerable code base spans all mainline kernels before the patch.

Risk and Exploitability

The vulnerability does not currently have an EPSS score or a presence in the CISA KEV catalog, indicating limited known exploitation. The CVSS score is not published; however, the nature of the flaw—memory exhaustion triggered by a controllable kernel API—offers a moderate to high impact if an attacker can repeatedly invoke the victim function. The likely attack vector is local or requires elevated privileges to interact with the RDMA/IB verbs interface; remote exploitation would need a privileged foothold or compromise of the system. The exploitability is bounded by the attacker’s ability to generate numerous erroneous GET_DATA_DIRECT_SYSFS_PATH calls. Sustained use could induce kernel memory pressure, swapping, or a crash, resulting in a denial of service for the host.

Generated by OpenCVE AI on May 27, 2026 at 17:34 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to a kernel release that incorporates the patch for the mlx5 GET_DATA_DIRECT_SYSFS_PATH memory leak.
  • If an updated kernel is unavailable, apply a local patch that inserts a kfree() call on the error path of the GET_DATA_DIRECT_SYSFS_PATH handler and rebuild the kernel.
  • Monitor kernel memory usage and enable detailed logging for kobject_get_path failures so that abnormal memory growth can be detected early.

Generated by OpenCVE AI on May 27, 2026 at 17:34 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 27 May 2026 18:00:00 +0000

Type Values Removed Values Added
Weaknesses CWE-401

Wed, 27 May 2026 14:15:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: RDMA/mlx5: Fix memory leak in GET_DATA_DIRECT_SYSFS_PATH handler The UVERBS_HANDLER(MLX5_IB_METHOD_GET_DATA_DIRECT_SYSFS_PATH) function allocates memory for the device path using kobject_get_path(). If the length of the device path exceeds the output buffer length, the function returns -ENOSPC but does not free the allocated memory, resulting in a memory leak. Add a kfree() call to the error path to ensure the allocated memory is properly freed. Compile tested only. Issue found using a prototype static analysis tool and code review.
Title RDMA/mlx5: Fix memory leak in GET_DATA_DIRECT_SYSFS_PATH handler
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-05-27T12:17:41.431Z

Reserved: 2026-05-13T15:03:33.085Z

Link: CVE-2026-45922

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-05-27T14:17:07.180

Modified: 2026-05-27T14:48:03.013

Link: CVE-2026-45922

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-05-27T19:00:14Z

Weaknesses