CVE-2026-45870

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

MEDIUM
5.5
CVSS Score
Published: May 27, 2026 at 12:15 PM UTC
Updated: June 27, 2026 at 11:41 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.2%

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.

Affected

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

3.10 ≤ v < 5.10.2523.10 ≤ v < 5.15.2023.10 ≤ v < 6.1.1653.10 ≤ v < 6.12.753.10 ≤ v < 6.18.143.10 ≤ v < 6.19.43.10 ≤ v < 6.6.1283.10 ≤ v < 7.05.11 ≤ v < 5.15.2025.16 ≤ v < 6.1.1656.13 ≤ v < 6.18.146.19 ≤ v < 6.19.46.2 ≤ v < 6.6.1286.7 ≤ v < 6.12.751d658336b05f8697d6445834f8867f8ad5e4f7353.10
Vendor states this is fixed in 3b56eb90feb8a3709417f5624f3871847d42bcb1 (fixed)
Vendor states this is fixed in 3e6397b056335cc56ef0e9da36c95946a19f5118 (fixed)
Vendor states this is fixed in 64303b92d94c0c7845a273acd8d84b796d6f1db7 (fixed)
Vendor states this is fixed in b4af3806846778799cd4ab0766dc18341e777264 (fixed)
Vendor states this is fixed in c81431b1b9fbd21e9a5a9211b5517b7295d18e6a (fixed)
Vendor states this is fixed in caf7eff432e91a9eba1c79fa545c2f54be15d62b (fixed)
Vendor states this is fixed in d79b9097a6a2b91471b40755f1225364be5d85ff (fixed)
Vendor states this is fixed in df10f23defff22c8d55fe6db74f6e4ce927145bf (fixed)
Vendor states this is fixed in 3.10 (unaffected)
Vendor states this is fixed in 5.10.252 (unaffected)
Vendor states this is fixed in 5.15.202 (unaffected)
Vendor states this is fixed in 6.1.165 (unaffected)
Vendor states this is fixed in 6.12.75 (unaffected)
Vendor states this is fixed in 6.18.14 (unaffected)
Vendor states this is fixed in 6.19.4 (unaffected)
Vendor states this is fixed in 6.6.128 (unaffected)
Vendor states this is fixed in 7.0 (unaffected)

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