CVE-2026-89541: SUNRPC: harden gss_unwrap_resp_priv length checks

Published Sep 11, 2026
·
Updated

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

SUNRPC: harden gssunwrapresppriv length checks

gssunwrapresppriv() validates the RPCSECGSS opaque length with

offset = (u8 )(p) - (u8 )head->iovbase; if (offset + opaquelen > rcvbuf->len) goto unwrapfailed; majstat = gssunwrap(ctx->gcgssctx, offset, offset + opaquelen, rcvbuf);

Both operands are u32 and the sum is computed in u32. A reply with opaquelen near 0xffffffff makes offset + opaquelen wrap to a small value that is below rcvbuf->len, so the bound check passes and gssunwrap() is called with end < begin. The check also lacks a lower bound, so any opaquelen in [0, GSSKRB5TOKHDRLEN) is accepted and forwarded to gsskrb5unwrapv2(), whose pre-decrypt header reads at ptr+4 and ptr+6 then run past the token.

A krb5p NFS server returning a crafted RPCSECGSS reply can drive the client into out-of-bounds reads in gsskrb5unwrapv2() and the rotateleft() loop that follows.

Fix by replacing the single combined check with three guards that are safe in u32 arithmetic and that enforce the RFC 4121 minimum outer token length:

if (offset > rcvbuf->len) goto unwrapfailed; if (opaquelen > rcvbuf->len - offset) goto unwrapfailed; if (opaquelen < GSSKRB5TOKHDRLEN) goto unwrapfailed;

The first guard makes the subtraction in the second guard unconditionally safe; offset is derived from a successful xdrinlinedecode() in the head kvec, so in practice it already satisfies the bound. The floor mirrors the server-side check added in commit 5b757c2e57a5 ("SUNRPC: svcauthgss: enforce krb5 token minimum length").

Affected Software

1 affected component
Linux Linux kernel

Event History

Sep 11, 2026
CVE Published
via MITRE·07:44 PM
Data Sourced
via MITRE·07:44 PM
Description

Frequently Asked Questions

1

What systems are realistically exposed to this issue?

Linux clients using RPCSEC_GSS with Kerberos privacy protection (krb5p) for NFS are exposed when they communicate with an NFS server that can return crafted RPCSEC_GSS replies.

2

What does an attacker need to exploit the flaw?

An attacker needs the ability to cause the affected client to process a malicious RPCSEC_GSS reply from a krb5p NFS server. The crafted reply uses an opaque token length that either overflows the length calculation or is shorter than the required RFC 4121 outer token header.

3

What is the resulting effect on an affected client?

The malformed reply can cause out-of-bounds reads in gss_krb5_unwrap_v2() and in the subsequent rotate_left() loop on the client.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203