sqlmapproject/sqlmap · error · KerberosError
KDC reply length %d exceeds the sane maximum
Error message
KDC reply length %d exceeds the sane maximum
What it means
Error "KDC reply length %d exceeds the sane maximum" thrown in sqlmapproject/sqlmap.
Source
Thrown at extra/kerberos/client.py:158
return der.sequence(*parts)
# ---- KDC transport (RFC 4120 section 7.2.2: 4-byte length-prefixed over TCP) ----------------------
def _recvExactly(sock, count):
buf = b""
while len(buf) < count:
chunk = sock.recv(count - len(buf))
if not chunk:
raise KerberosError(-1, "connection closed by KDC")
buf += chunk
return buf
def _sendReceive(host, port, request):
sock = socket.create_connection((host, port), timeout=KDC_TIMEOUT)
try:
sock.sendall(struct.pack(">I", len(request)) + request)
length = struct.unpack(">I", _recvExactly(sock, 4))[0]
if length > MAX_KDC_RESPONSE:
raise KerberosError(-1, "KDC reply length %d exceeds the sane maximum" % length)
return _recvExactly(sock, length)
finally:
sock.close()
def _raiseIfError(message):
tag, content, _ = der.peel(message)
if tag == der.applicationTag(KRB_ERROR):
fields = _fields(der.peel(content)[1])
raise KerberosError(_expInteger(fields[6]) if 6 in fields else -1,
_expString(fields[11]) if 11 in fields else None)
return tag, content
def _etypeHints(methodData):
"""Parse a METHOD-DATA TLV (SEQUENCE OF PA-DATA) into PA-ETYPE-INFO2 hints as
{etype: (salt, iterations)}, telling us which etype/salt/s2kparams the KDC expects for the
long-term key. The first entry for an etype wins; a malformed hint yields none (so the caller
falls back to its defaults) rather than raising."""
View on GitHub (pinned to 0a35b20e39)
When it happens
Trigger: Thrown at extra/kerberos/client.py:158 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of sqlmapproject/sqlmap@0a35b20e39 (2026-08-26).
Data as JSON: /api/errors/6a572e8837c8735c.
Report an issue: GitHub.