KernelScan.io

CRITICAL Introduced in 2.6.15

sunrpc GssUnwrap OOB

CVE-2026-89541

CVSS 9.8 / 10.0 NVD

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

KernelScan AI9.1CRITICAL

01

In the Linux kernel, the following vulnerability has been resolved: SUNRPC: harden gss_unwrap_resp_priv length checks gss_unwrap_resp_priv() validates the RPCSEC_GSS opaque length with offset = (u8 *)(p) - (u8 *)head->iov_base; if (offset + opaque_len > rcv_buf->len) goto unwrap_failed; maj_stat = gss_unwrap(ctx->gc_gss_ctx, offset, offset + opaque_len, rcv_buf); Both operands are u32 and the sum is computed in u32. A reply with opaque_len near 0xffffffff makes offset + opaque_len wrap to a small value that is below rcv_buf->len, so the bound check passes and gss_unwrap() is called with end < begin. The check also lacks a lower bound, so any opaque_len in [0, GSS_KRB5_TOK_HDR_LEN) is accepted and forwarded to gss_krb5_unwrap_v2(), whose pre-decrypt header reads at ptr+4 and ptr+6 then run past the token. A krb5p NFS server returning a crafted RPCSEC_GSS reply can drive the client into out-of-bounds reads in gss_krb5_unwrap_v2() and the rotate_left() 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 > rcv_buf->len) goto unwrap_failed; if (opaque_len > rcv_buf->len - offset) goto unwrap_failed; if (opaque_len < GSS_KRB5_TOK_HDR_LEN) goto unwrap_failed; The first guard makes the subtraction in the second guard unconditionally safe; offset is derived from a successful xdr_inline_decode() in the head kvec, so in practice it already satisfies the bound. The floor mirrors the server-side check added in commit 5b757c2e57a5 ("SUNRPC: svcauth_gss: enforce krb5 token minimum length").

02

Engine v0.6.0

Risk summary

A malicious or compromised NFS server can exploit a 32-bit integer overflow in the client's RPCSEC_GSS krb5p response handler to bypass length validation and trigger out-of-bounds memory reads in the kernel. Any Linux system mounting NFS shares with krb5p privacy mode is at risk; the attack requires no client-side privileges and can leak kernel memory or crash the system.

Affectednet/sunrpc/auth_gss/auth_gss.c (SUNRPC)

Vulnerability analysis

The NFS client's RPCSEC_GSS privacy mode (krb5p) response handler validates the GSS opaque token length with a 32-bit unsigned addition that can wrap around, causing a crafted reply with a near-maximum length value to bypass the bounds check and pass an inverted range to the unwrap routine. The check also lacks a minimum length floor, so undersized token lengths reach the Kerberos unwrap code, where header reads run past the token boundary. A malicious or compromised NFS server can exploit this by returning a crafted RPCSEC_GSS reply to any client mounting with krb5p, driving the client kernel into out-of-bounds memory reads. The fix replaces the single combined check with three separate guards that are safe under unsigned arithmetic and enforce the RFC 4121 minimum token length.

03

BranchIntroducedFixed inPatch commit
mainline2.6.157.3-rc187831b92112c
5.102.6.155.10.2703691c4b3488d
6.12.6.156.1.188401f6a5b338d
7.22.6.157.2.4d395c30d570c
6.62.6.156.6.15781fd7654a842
5.152.6.155.15.22185fa6b12e8f4
6.122.6.156.12.10989a15a50f84d
6.182.6.156.18.50ebcbd2523a85
cip/6.122.6.156.12.111-cip3289a15a50f84d