[krbdev.mit.edu #9251] git commit

Greg Hudson via RT rt at krbdev.mit.edu
Mon Nov 9 12:02:50 EST 2026


<URL: https://krbdev.mit.edu/rt/Ticket/Display.html?id=9251 >


Prevent KDC read overrun in ASN.1 decoder

The KDC decodes requests using the libkrb5 ASN.1 DER decoder, but
obtains pointers to subsets of the encoding (such as the KDC-REQ-BODY)
via its own fetch_asn1_field().  This utility function does not
consider the input length, assumes the tag identifier is a single
byte, and supports indefinite length encoding.  The libkrb5 decoder
accepts multi-byte tag identifiers and does not enforce minimality of
tag identifier encoding.  A request packet crafted using a non-minimal
tag identifier can pass through the libkrb5 decoder, but fool
fetch_asn1_field() into indefinite length processing, which may send
it reading far beyond the bounds of the packet.  Discovered by Claude
and Ada Logics.

In fetch_asn1_field(), error out if we see a tag identifier byte
indicating a multi-byte encoding.  Also remove indefinite length
processing; the libkrb5 decoder stopped supporting it in commit
d9443a58cd364349b7d764f4e997f3af7d979a87.

CVE-2026-107364:

In all released versions of MIT krb5, an unauthenticated attacker can
cause a KDC process to perform a large read overrun, likely causing
the process to terminate.

(cherry picked from commit cf44b0658832871f739d5074e7d27288b2718bfb)

https://github.com/krb5/krb5/commit/4e941239157dd30969998f33db0708b8d297bd41
Author: Greg Hudson <ghudson at mit.edu>
Commit: 4e941239157dd30969998f33db0708b8d297bd41
Branch: krb5-1.22
 src/kdc/kdc_util.c             | 33 ++++++-------------------------
 src/tests/Makefile.in          |  1 +
 src/tests/t_cve-2026-107364.py | 45 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 52 insertions(+), 27 deletions(-)



More information about the krb5-bugs mailing list