sqlmapproject/sqlmap · error · ValueError
too many DNS compression jumps
Error message
too many DNS compression jumps
What it means
_readName followed more compression pointers than _MAX_NAME_JUMPS (64) allows. A well-formed DNS name cannot need that many jumps; the count guards against compression-pointer cycles in crafted responses that would otherwise loop forever.
Solutions
- Treat the response as malicious/corrupt and discard it; re-query the record.
- Verify the DNS server is the intended one (a spoofed response may contain cyclic pointers).
- Do not simply raise the limit — the bound exists to stop infinite loops.
- Log the raw packet for analysis and fail discovery gracefully.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at extra/kerberos/discovery.py:119 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/c9a456d6517b1b62.
Report an issue: GitHub.
Appendix: source
Thrown at extra/kerberos/discovery.py:119
offset += 1 + length
def _readName(data, offset):
labels = []
end = None
jumps = 0
while True:
if offset >= len(data):
raise ValueError("truncated DNS name")
length = data[offset]
if length == 0:
offset += 1
break
if length & 0xc0 == 0xc0: # follow compression pointer (bounded, cycle-safe)
if offset + 2 > len(data):
raise ValueError("truncated DNS pointer")
jumps += 1
if jumps > _MAX_NAME_JUMPS:
raise ValueError("too many DNS compression jumps")
if end is None:
end = offset + 2
offset = ((length & 0x3f) << 8) | data[offset + 1]
continue
if offset + 1 + length > len(data):
raise ValueError("truncated DNS label")
labels.append(bytes(data[offset + 1:offset + 1 + length]).decode("ascii", "replace"))
offset += 1 + length
return ".".join(labels), (end if end is not None else offset)
def parseSrv(response):
"""Parse SRV records from a (possibly hostile) DNS response into [(priority, weight, port,
target), ...]. Malformed input yields an empty list rather than raising."""
data = bytearray(response)
if len(data) < 12:
return []
try:View on GitHub (pinned to 0a35b20e39)