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

SUNRPC: auth_gss: fix memory leaks in XDR decoding error paths

The gssx_dec_ctx(), gssx_dec_status(), and gssx_dec_name()
functions allocate memory via gssx_dec_buffer(), which calls
kmemdup(). When a subsequent decode operation fails, these
functions return immediately without freeing previously
allocated buffers, causing memory leaks.

The leak in gssx_dec_ctx() is particularly relevant because
the caller (gssp_accept_sec_context_upcall) initializes several
buffer length fields to non-zero values, resulting in memory
allocation:

struct gssx_ctx rctxh = {
.exported_context_token.len = GSSX_max_output_handle_sz,
.mech.len = GSS_OID_MAX_LEN,
.src_name.display_name.len = GSSX_max_princ_sz,
.targ_name.display_name.len = GSSX_max_princ_sz
};

If, for example, gssx_dec_name() succeeds for src_name but
fails for targ_name, the memory allocated for
exported_context_token, mech, and src_name.display_name
remains unreferenced and cannot be reclaimed.

Add error handling with goto-based cleanup to free any
previously allocated buffers before returning an error.
Published: 2026-05-27
Score: n/a
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

A sequence of functions in the Linux kernel’s SUNRPC GSS subsystem allocates memory when decoding XDR data but does not free that memory when subsequent decoding steps fail, resulting in a classic memory‑leak (CWE-401). The leak can grow unboundedly as the kernel repeatedly requests XDR buffers that are never reclaimed, potentially exhausting system memory and causing a denial of service at the kernel level.

Affected Systems

The flaw resides in the Linux kernel’s auth_gss XDR decoding logic. No specific kernel versions were listed, so any Linux system running a kernel that includes this logic before the applied patch is at risk.

Risk and Exploitability

The vulnerability is not listed in the CISA KEV catalog and EPSS data is unavailable, indicating no documented exploitation to date. Because the affected functions are invoked during SUNRPC authentication, an attacker with network access who can send crafted RPC requests may trigger the error paths repeatedly. Repeated failures would lead to progressive kernel memory consumption, potentially exhausting available memory and causing a denial of service on the affected host or in a cluster of kernels.

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

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the kernel to a patched release that includes the memory‑leak fix, ensuring the updated source contains the goto‑based cleanup in gssx_dec_ctx, gssx_dec_status, and gssx_dec_name.
  • If an upgrade cannot be performed immediately, apply traffic filtering or rate‑limiting to RPC services (e.g., via iptables or firewalld) to reduce repeated failed authentication attempts that could trigger the leak.
  • Continuously monitor kernel memory usage and RPC authentication logs for signs of repeated decoding errors; configure alerts for sudden memory growth or elevated failure rates, and investigate or isolate offending traffic if detected.

Generated by OpenCVE AI on May 27, 2026 at 17:44 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: SUNRPC: auth_gss: fix memory leaks in XDR decoding error paths The gssx_dec_ctx(), gssx_dec_status(), and gssx_dec_name() functions allocate memory via gssx_dec_buffer(), which calls kmemdup(). When a subsequent decode operation fails, these functions return immediately without freeing previously allocated buffers, causing memory leaks. The leak in gssx_dec_ctx() is particularly relevant because the caller (gssp_accept_sec_context_upcall) initializes several buffer length fields to non-zero values, resulting in memory allocation: struct gssx_ctx rctxh = { .exported_context_token.len = GSSX_max_output_handle_sz, .mech.len = GSS_OID_MAX_LEN, .src_name.display_name.len = GSSX_max_princ_sz, .targ_name.display_name.len = GSSX_max_princ_sz }; If, for example, gssx_dec_name() succeeds for src_name but fails for targ_name, the memory allocated for exported_context_token, mech, and src_name.display_name remains unreferenced and cannot be reclaimed. Add error handling with goto-based cleanup to free any previously allocated buffers before returning an error.
Title SUNRPC: auth_gss: fix memory leaks in XDR decoding error paths
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:15:50.199Z

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

Link: CVE-2026-45870

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Awaiting Analysis

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

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

Link: CVE-2026-45870

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-05-27T17:45:33Z

Weaknesses