Bug in blitiri.com.ar/go/spf

4 views
Skip to first unread message

Behrang Sabeghi

unread,
Aug 17, 2023, 6:50:33 PM8/17/23
to chas...@googlegroups.com
Hello,

I think I've found a bug in the SPF library and I wanted to report it.
As mentioned in the comment there NXDOMAIN should result in a 'none' result, however, in testing I realized that I get a 'permerror' and when I turned on trace logs, this is what I saw:

ERRO[0004] check "abcdefghijklmnopqrstuvwxyzabc.com" 0 0
ERRO[0004] dns perm error: lookup abcdefghijklmnopqrstuvwxyzabc.com on 127.0.0.53:53: cannot marshal DNS message

 Thank you for your time.

Best,
Behrang Sabeghi

Alberto Bertogli

unread,
Aug 17, 2023, 6:56:26 PM8/17/23
to Behrang Sabeghi, chas...@googlegroups.com
That's because the DNS lookup of abcdefghijklmnopqrstuvwxyzabc.com is,
in your environment, not returning "does not exist" (which would get
mapped to 'none'), it is returning a message that cannot be parsed by
the Go library, which is considered a permanent error.

So this is something between your DNS server and the Go DNS client, and
not an issue in the SPF library.

If I try that domain here on my machine, I correctly get a 'none'
result.

I suggest you look at your DNS server because it is strange it's sending
an invalid reply (as shown by the "cannot marshal DNS message").

Thanks!
Alberto

Behrang Sabeghi

unread,
Aug 18, 2023, 10:10:00 AM8/18/23
to Alberto Bertogli, chas...@googlegroups.com
Thank you very much for your swift response, I really appreciate it.

Just wanted to let you know that I tested it once more on an AWS EC2 instance and I got a 'none' result as you said. I had already taken a tcpdump in my local environment on port 53 before emailing you and I could see that the response to the query is NXDOMAIN but there must be something else wrong with my local DNS.

Thanks again,
Behrang
Reply all
Reply to author
Forward
0 new messages