-
Notifications
You must be signed in to change notification settings - Fork 340
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
fix-host_txt_rdata.patch #395
Comments
If you do these as pull requests instead of issues I can easily apply them with your supplied metadata. (I.E. proper attribution.) FYI. |
almost two whole years ... probably time to just do it without attribution? |
On 11/2/22 12:42, nomas2000 wrote:
```
The TXT RR RDATA returned by DNS servers is rfc1035 <character-string>s
<character-string> is a single length octet followed by that number of characters.
... notice how the first RDATA byte is usually 1-less than the RDLENGTH?
If max allowed TXT record length is 255 chars + we assume only one char string,
then we can just verify and discard the first byte of TXT RDATA. If first byte
doesn't match (1 shorter than RDLENGTH) then don't discard it.
... throw an error instead? ... ignore the response as invalid?
Sorry for sitting on this so long, the problem is I can't find a test
site that actually returns a non-truncated packet for any -t txt search.
What server did you test this with?
For example the return from google.com has "docusign=" and
"verification" strings for apple and facebook and cisco. It seems that
most DNS servers only want to return UDP packets of 512 bytes maximum,
and set the "truncated" flag with no payload on anything larger.
According to strace -f, Debian's "host" command will fall back to TCP
for a UDP return packet with the truncated bit set, even when given the
-U flag.
I can apply your patch, but does it fix the issue? (Is there a fix other
than implementing TCP/IP mode?)
|
?? Just stop including (outputting) the leading LENGTH byte in the result !!
|
"You can currently test against facebook.com."
Thanks, that's what I needed.
Commit 4b238cf
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: