Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusing AXFR errors #1624

Open
kalfeher opened this issue Jan 11, 2025 · 4 comments
Open

Confusing AXFR errors #1624

kalfeher opened this issue Jan 11, 2025 · 4 comments

Comments

@kalfeher
Copy link

Description

When attempting an xfr from zonedata.iis.se, for se. using a non-tsig signed transfer I see the following error consistently:
dns: overflowing header size

When attempting an xfr from zonedata.iis.se, for nu. using a non-tsig signed transfer I see the following two errors occasionally:
dns: overflow unpacking uint16
dns: buffer size too small
However the transfer attempt for nu. will also work as expected about half of the time.

I'm using just the high level APIs for a simple transfer. AXFR via dig @zonedata.iis.se axfr se works as expected.

Steps to reproduce

func main() {
	name := "se."
	primary := "zonedata.iis.se:53"
	t := new(dns.Transfer)
	m := new(dns.Msg)
	m.SetAxfr(name)
	c, err := t.In(m, primary)
	if err != nil {
		fmt.Println(err)
		return
	}
	for r := range c {
		if r.Error != nil {
			fmt.Println(r.Error)
			return
		}
		for _, a := range r.RR {
			fmt.Println(a.String() + "\n")
		}
	}
}

Expected Behaviour

All records received for zone file (~8106000 RRs), finishing with the SOA RR.

Actual Behaviour

For SE zone I receive the error dns: overflowing header size at some point during the transfer. Number of records received before the error is not consistent.

For NU zone I receive the one of the following errors at some point during the transfer dns: overflow unpacking uint16 or dns: buffer size too small. As with the SE zone, the number of records received before the error is not consistent. Approx half of my transfer attempts succeed for the NU zone.

@miekg
Copy link
Owner

miekg commented Jan 24, 2025

thanks for the repro. I just ran that on my laptop , without seeing any error.

Was some record removed from zone?

@kalfeher
Copy link
Author

Unclear if changes have been made to the zone or platform. I reported the issue to IIS who shared internally, but I've not heard back.
The symptoms remain for me. My pcaps indicate that the records restart at some point (sometimes after only a few hundred RRs other times after a few thousand), which results a TCP segment that is never received. Then it's just DUP and retransmissions and eventually the connection fails. By restart, I mean the SOA is re-sent and RRs begin again from the top of the zone.
I suspect this is related to some special behaviour of the zonedata.iis.se host, particularly over high latency connections. I'm fetching from Australia.
I see the same symptoms in pcaps using dig, but the connection remains resilient and eventually the axfr completes.

As far as this DNS library is concerned, I'm trying to understand the errors in order to be more resilient to the behaviour of the host.

@miekg
Copy link
Owner

miekg commented Jan 29, 2025 via email

@kalfeher
Copy link
Author

kalfeher commented Feb 3, 2025

se_cap_golang-filtered-01.pcap.gz

I've attached a pcap starting a few records before the first malformed RR is seen. The library returns dns: overflowing header size at the end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants