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

Add length checks for resource record parsing #43

Merged
merged 13 commits into from
Feb 17, 2022

Conversation

jtt
Copy link
Contributor

@jtt jtt commented Feb 17, 2022

Adds necessary length checks for parsing resource records to ensure RDATA contains enough data. This prevents dns-collector from panicking if DNS packets containing invalid resource records are received.

The A and AAAA record parsing now uses net.IP to print address as text, this changes the output for IPv6 address to be the compressed format of the address. Please let me know if this is not ok, and I'll change it back to print the long format.

This PR also contains fix for a bug prevented parsing any resource record after OPT record.

@dmachard dmachard merged commit 6c86cd9 into dmachard:main Feb 17, 2022
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

Successfully merging this pull request may close these issues.

2 participants