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

Parsing truncated DNS responses can produce 3 different errors #1389

Open
saethlin opened this issue Feb 26, 2021 · 2 comments
Open

Parsing truncated DNS responses can produce 3 different errors #1389

saethlin opened this issue Feb 26, 2021 · 2 comments

Comments

@saethlin
Copy link
Contributor

There are apparently DNS servers which return responses that are truncated, but do not set the truncated bit. This results in one of these three errors, depending on where the truncation occurs:

ProtoError { kind: Msg("rdata length too large for remaining bytes, need: 46 remain: 2") }
ProtoError { kind: Message("buffer exhausted") }
ProtoError { kind: Message("unexpected end of input reached") }

It would be nice if these were all the same type so that software could react to this situation. Unfortunately I don't know that this is visible in the resolver, and I haven't (yet?) noticed any such responses coming from public DNS servers.

@bluejekyll
Copy link
Member

Is this related at all to your testing? #1384

@saethlin
Copy link
Contributor Author

saethlin commented Feb 28, 2021

I don't think it's related. Our application in this case is purely passive; we're trying trying to parse DNS traffic which is observed by a network sensor, and not necessarily produced by trust-dns.

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