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

valid TXT answer is considered invalid #106

Open
hanickadot opened this issue Aug 4, 2022 · 2 comments
Open

valid TXT answer is considered invalid #106

hanickadot opened this issue Aug 4, 2022 · 2 comments

Comments

@hanickadot
Copy link

Hi,

I was told about your awesome utility and I really like it. Yesterday I noticed probably a bug, when I tried this query:

dog 24yzjhop3iawhkuxy4b3yj36dogrbkwwz2xivaujzqzeyiwobz2a.luna.avast.com. TXT

This query returns two TXT record, one is 53 bytes long and other exactly 255.

The utility returns error:
Error [protocol]: Malformed packet: insufficient data (latest GIT master 721440b12ef01a812abe5dc6ced69af6e221fad5)
or once I got:
Error [protocol]: Malformed packet: length 256 was specified, but read 257 bytes (with dog v0.1.0)

I'm using dog on Mac OS 12.5 on Arm.

I believe the error is associated with this piece of code:

https://github.com/ogham/dog/blob/master/dns/src/record/txt.rs#L45

As one of the records is exactly 255 bytes long. And there is no other piece of it. The record is persistent so you can try on your own.

Thanks!

@varenc
Copy link

varenc commented Dec 3, 2022

I have the same problem on macOS. Simple example:

$ dog dropbox.com TXT
Error [protocol]: Malformed packet: length 345 was specified, but read 255 bytes

I assume this is because one of the spf TXT records exceeds 255 bytes. However, as long as no single string in quotes exceed 255 bytes then it's still in spec. In my example case, the spf record has a 254 byte and a 89 byte string. Dig works fine: dig dropbox.com TXT

@pietrzakacper
Copy link

I have a smilar problem:
Screen Shot 2023-03-02 at 13 41 17

dog fails to get TXT for google._domainkey.redsift.com while dig succeds

Looks like a lack of support for split TXT records for me

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

3 participants