# CVE-2026-89551: SUNRPC: xdr\_buf\_trim: clamp buf-\>len to avoid underflow

- Priority: **Prioritise**
- Reason: Severe, CVSS 9.8 (CVE.org); no exploitation reported by the 5 checked sources; EPSS 1% (FIRST, 05-12-2026)
- Next step: Check applicability: affected before 3f491306dcb673ff5e78e1044ba450c58978774e, 4bf59cb0ea5b0ddfbc46a1dc2fa78fc8b9986ce4, 85e9602650e9df07190abe817cee3b4d9bc3df17, a3d77bcd974b8625d16bddf448cb3a1b5e37049c, a924ac4c78afab71bf82641afa3b62e0c4a8b55e, ad0cce80d4af2f74674e8b635d97aa3880e83da8, e6267cccd7b05cc514e57f2160aa8db85f5c2701, fa16bbe987b47e771e52eeb1b4540f18d92496ac (CNA); fix release not confirmed
- Status: published
- Published: 2026-09-11 · Modified: 2026-10-19
- Aliases: UBUNTU-CVE-2026-89551, DEBIAN-CVE-2026-89551
- Record: https://cvemate.com/vulnerability/CVE-2026-89551 · JSON: https://cvemate.com/vulnerability/CVE-2026-89551/json

## Description

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

SUNRPC: xdr_buf_trim: clamp buf->len to avoid underflow

xdr_buf_trim() trims `len` bytes from the tail of an xdr_buf by
walking the tail, pages, and head iovecs.  Each per-section step
uses min_t() so it never removes more bytes than that section
holds, but the final accounting at the fix_len label subtracts the
total bytes actually consumed from buf->len without any clamp:

    fix_len:
            buf->len -= (len - trim);

When the caller has set buf->len to a value smaller than the sum
of the iov_lens, (len - trim) can exceed buf->len and the unsigned
subtraction wraps to near UINT_MAX.  gss_krb5_unwrap_v2() reaches
xdr_buf_trim() in exactly that state:

    buf->head[0].iov_len -= GSS_KRB5_TOK_HDR_LEN + headskip;
    buf->len = len - (GSS_KRB5_TOK_HDR_LEN + headskip);
    xdr_buf_trim(buf, ec + GSS_KRB5_TOK_HDR_LEN + tailskip);

buf->len is a small wire-derived value while the iov_lens are at
page scale, so the per-section loops legitimately consume far more
bytes than buf->len records.  The wrapped buf->len then propagates
as the authoritative stream bound into every downstream XDR
decoder.

Fix by clamping the decrement so buf->len bottoms out at zero:

    buf->len -= min_t(unsigned int, buf->len, len - trim);

On the normal path where the iov_lens sum to buf->len, (len - trim)
is always <= buf->len and the result is identical to before.  No
callers change behavior outside the underflow case.
```

## Signals

- CVSS: 9.8 critical (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- EPSS: 0.514%, percentile 45.328%, as of 2026-12-05
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 172)

- debian linux (Debian): All versions (No fix recorded) \| \< 6.1.190-1 \| \< 6.12.111-1 \| \< 7.2.6-1
- debian linux-6.12 (Debian): \< 6.12.111-1~deb12u1
- ubuntu linux (Ubuntu): All versions (No fix recorded) \| \< 5.15.0-202.212 \| \< 6.8.0-149.149 \| \< 7.0.0-42.42
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): All versions (No fix recorded) \| \< 5.15.0-1119.126 \| \< 6.8.0-1069.74 \| \< 7.0.0-1016.17
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.15 (Ubuntu): All versions (No fix recorded) \| \< 5.15.0-1119.126~20.04.1
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.4 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.14 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.17 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.5 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.8 (Ubuntu): All versions (No fix recorded) \| \< 6.8.0-1069.74~22.04.1
- ubuntu linux-aws-7.0 (Ubuntu): All versions (No fix recorded) \| \< 7.0.0-1017.18~24.04.1
- ubuntu linux-aws-fips (Ubuntu): All versions (No fix recorded) \| \< 5.15.0-1119.126+fips1 \| \< 6.8.0-1069.74+fips1

## References (first 20 of 33)

- <https://git.kernel.org/stable/c/a3d77bcd974b8625d16bddf448cb3a1b5e37049c>
- <https://git.kernel.org/stable/c/fa16bbe987b47e771e52eeb1b4540f18d92496ac>
- <https://git.kernel.org/stable/c/a924ac4c78afab71bf82641afa3b62e0c4a8b55e>
- <https://git.kernel.org/stable/c/4bf59cb0ea5b0ddfbc46a1dc2fa78fc8b9986ce4>
- <https://git.kernel.org/stable/c/e6267cccd7b05cc514e57f2160aa8db85f5c2701>
- <https://git.kernel.org/stable/c/ad0cce80d4af2f74674e8b635d97aa3880e83da8>
- <https://git.kernel.org/stable/c/85e9602650e9df07190abe817cee3b4d9bc3df17>
- <https://git.kernel.org/stable/c/3f491306dcb673ff5e78e1044ba450c58978774e>
- <https://ubuntu.com/security/CVE-2026-89551>
- <https://www.cve.org/CVERecord?id=CVE-2026-89551>
- <https://git.kernel.org/linus/3f491306dcb673ff5e78e1044ba450c58978774e>
- <https://security-tracker.debian.org/tracker/CVE-2026-89551>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-89551>
- <https://ubuntu.com/security/notices/USN-8962-1>
- <https://ubuntu.com/security/notices/USN-8961-1>
- <https://ubuntu.com/security/notices/USN-8959-1>
- <https://ubuntu.com/security/notices/USN-8963-1>
- <https://ubuntu.com/security/notices/USN-9002-1>
- <https://ubuntu.com/security/notices/USN-9020-1>
- <https://ubuntu.com/security/notices/USN-9023-1>

---

Data as of 2026-12-06T04:33:09.972Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
