CVE-2026-112319: Krb5: mit krb5 kadmind authenticated memory exhaustion dos via unbounded rpc xdr allocation

Published May 18, 2026
·
Updated

AIONLYREPORT package: krb5-1.21.3-8.el100 ------ Summary: Authenticated Memory Exhaustion and Leak in RPCSECGSS Unwrapping (xdrrpcgssunwrapdata): authenticated RPCSECGSS DATA requests can supply oversized XDR lengths that trigger large pre-verification allocations and leave some decode-failure allocations unreleased, enabling repeatable memory exhaustion and denial of service. Requirements to exploit: A remote attacker needs network reachability to a deployed service using this SRPM's GSSRPC unwrap path, a valid RPCSECGSS security context accepted by that service, and the ability to send oversized or truncated wrapped RPC arguments. Component affected: krb5 library code in src/lib/rpc/authgssprot.c:xdrrpcgssunwrapdata via xdrrpcgssbuf, with the allocation behavior in src/lib/rpc/xdr.c:xdrbytes Version affected: krb5-1.21.3-8.el100 when deployed with a service that accepts authenticated RPCSECGSSDATA requests through the GSSRPC unwrap path Patch available: no released package fix established; proposed patch included below Version fixed: unknown Upstream coordination: Not notified. CVSS: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H - 6.5 (MEDIUM) AV:N - The issue is reachable over the network against a service exposing the RPCSECGSS unwrap path. AC:L - Once authenticated, the attack is straightforward: send oversized XDR lengths and a malformed or incomplete wrapped body. PR:L - A valid RPCSECGSS context is required. UI:N - No user interaction is needed. S:U - The impact is confined to the targeted service process. C:N - No confidentiality impact is established by the available evidence. I:N - No integrity impact is established by the available evidence. A:H - Large allocations plus unreleased buffers on some decode failures can exhaust memory and deny service. Impact: Important. Where this RPCSECGSS path is exposed, an authenticated remote client can directly compromise availability by forcing repeated high-memory allocations and leak-driven growth in the service process. This aligns with Red Hat's Important category for remote denial of service; the authentication requirement and lack of demonstrated confidentiality or integrity impact keep it below Critical. Embargo: no Reason: The issue requires valid RPCSECGSS credentials and exposure of a vulnerable RPCSECGSS service, and the demonstrated impact is denial of service rather than code execution or privilege escalation. Acknowledgement: Aisle Research Vulnerability Details: xdrrpcgssunwrapdata decodes attacker-controlled wrapped buffers with maxsize = (unsigned int)-1 for both integrity and privacy services. That value is then passed into xdrbytes, which allocates memory directly from the wire length before MIC verification or unwrap validation completes. c if (svc == RPCSECGSSSVCINTEGRITY) { / Decode databodyinteg. / if (!xdrrpcgssbuf(xdrs, &databuf, (unsigned int)-1)) { logdebug("xdr decode databodyinteg failed"); return (FALSE); } / Decode checksum. / if (!xdrrpcgssbuf(xdrs, &wrapbuf, (unsigned int)-1)) { gssreleasebuffer(&minstat, &databuf); logdebug("xdr decode checksum failed"); return (FALSE); } / Verify checksum and QOP. / majstat = gssverifymic(&minstat, ctx, &databuf, &wrapbuf, &qopstate); free(wrapbuf.value); if (majstat != GSSSCOMPLETE || qopstate != qop) { gssreleasebuffer(&minstat, &databuf); logstatus("gssverifymic", majstat, minstat); return (FALSE); } } else if (svc == RPCSECGSSSVCPRIVACY) { / Decode databodypriv. / if (!xdrrpcgssbuf(xdrs, &wrapbuf, (unsigned int)-1)) { logdebug("xdr decode databodypriv failed"); return (FALSE); } c if (! xdruint(xdrs, sizep)) { return (FALSE); } nodesize = sizep; if ((nodesize > maxsize) && (xdrs->xop != XDRFREE)) { return (FALSE); } / now deal with the actual bytes / switch (xdrs->xop) {

case XDRDECODE: if (nodesize == 0) { return (TRUE); } if (sp == NULL) { cpp = sp = (char )memalloc(nodesize); } Because maxsize is effectively UINTMAX in this call path, the nodesize > maxsize check does not provide a practical bound. The allocation happens before gssverifymic() or gssunwrap(), and some decode-error exits return FALSE without releasing every buffer that may already have been allocated. Repeated malformed or incomplete authenticated requests can therefore grow process RSS over time and deny service. The available evidence supports an availability issue; no direct confidentiality or integrity impact was established. Steps to reproduce: 1. Start a service using this GSSRPC code path with RPCSECGSS enabled over TCP, for example an administration service using the GSSRPC server path. 2. Establish a valid RPCSECGSS context as an authenticated client. 3. Send an RPCSECGSSDATA request with gcproc = RPCSECGSSDATA and gcsvc = RPCSECGSSSVCINTEGRITY or RPCSECGSSSVCPRIVACY. 4. Set the wrapped databuf or wrapbuf XDR length prefix to a large value, such as 64 MB or larger. 5. Trigger decode failure after allocation by sending a malformed or incomplete wrapped body and closing the connection, then repeat the request. 6. Observe process RSS increasing over time, followed by service degradation or denial of service. Mitigation: Until a code fix is available, restrict network exposure of services that use this RPCSECGSS unwrap path to trusted authenticated principals and apply conservative service memory limits where possible. Existing connection-count controls can reduce concurrent amplification, but they do not prevent serial memory growth because allocation occurs before MIC or unwrap verification. Proposed Fix: A minimal patch is below. It introduces a bounded unwrap size and adds cleanup in decode-failure branches that can leave wrapbuf allocated. The bound can also be made configurable or tied to transport policy. diff diff --git a/src/lib/rpc/authgssprot.c b/src/lib/rpc/authgssprot.c — a/src/lib/rpc/authgssprot.c +++ b/src/lib/rpc/authgssprot.c @@ -46,6 +46,9 @@ #include <gssapi/gssapi.h> #endif +/ Upper bound for decoded wrapped RPCSECGSS payloads. / +#define RPCSECGSSMAXUNWRAP (16U 1024U 1024U) + boolt xdrrpcgssbuf(XDR xdrs, gssbuffert buf, uint maxsize) { @@ -202,13 +205,18 @@ xdrrpcgssunwrapdata(XDR xdrs, xdrproct xdrfunc, caddrt xdrptr, if (svc == RPCSECGSSSVCINTEGRITY) { / Decode databodyinteg. / - if (!xdrrpcgssbuf(xdrs, &databuf, (unsigned int)-1)) { + if (!xdrrpcgssbuf(xdrs, &databuf, RPCSECGSSMAXUNWRAP)) { logdebug("xdr decode databodyinteg failed"); return (FALSE); } / Decode checksum. / - if (!xdrrpcgssbuf(xdrs, &wrapbuf, (unsigned int)-1)) { + if (!xdrrpcgssbuf(xdrs, &wrapbuf, RPCSECGSSMAXUNWRAP)) { gssreleasebuffer(&minstat, &databuf); + if (wrapbuf.value != NULL) + free(wrapbuf.value); logdebug("xdr decode checksum failed"); return (FALSE); } @@ -225,7 +233,10 @@ xdrrpcgssunwrapdata(XDR xdrs, xdrproct xdrfunc, caddrt xdrptr, } else if (svc == RPCSECGSSSVCPRIVACY) { / Decode databodypriv. / - if (!xdrrpcgssbuf(xdrs, &wrapbuf, (unsigned int)-1)) { + if (!xdrrpcgssbuf(xdrs, &wrapbuf, RPCSECGSSMAXUNWRAP)) { + if (wrapbuf.value != NULL) + free(wrapbuf.value); logdebug("xdr decode databodypriv failed"); return (FALSE); } ------ This report was generated using AI technology. Always review AI-generated content prior to use

Other sources

The GSS-RPC layer in MIT Kerberos 5 (aka krb5) does not enforce size limits on XDR-decoded data, which allows remote authenticated users to cause a denial of service (memory exhaustion or excessive CPU consumption in kadmind) via crafted RPC requests that trigger unbounded memory allocations during XDR decoding.

— MITRE

Affected Software

6 affected componentsFixes available
redhat/krb5=1.21.3-8.el10_0
debian/krb5*
debian/krb5*
debian/krb5*
debian/krb5<=1.20.1-2+deb12u5, <=1.21.3-5+deb13u1, <=1.22.1-3
alpine/krb5<1.22.3-r0
1.22.3-r0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade alpine/krb5 to a version that resolves this vulnerability.

    Fixed in 1.22.3-r0
  2. Compensating control

    Restrict network exposure of services using the RPCSEC_GSS unwrap path to trusted authenticated principals.

  3. Compensating control

    Apply conservative service memory limits where possible to limit high-memory allocations and leak-driven growth.

  4. Compensating control

    Use existing connection-count controls to reduce concurrent amplification against the exposed RPCSEC_GSS service.

Event History

May 18, 2026
Data Sourced
via Red Hat·03:42 AM
DescriptionSeverityAffected Software
Nov 9, 2026
CVE Published
via MITRE·07:08 PM
Data Sourced
via MITRE·07:08 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·07:16 PM
DescriptionSeverityWeakness
Data Sourced
via OSV·07:16 PM
DescriptionSeverityAffected Software
Exploit Published
via CISA·07:34 PM

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