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

dnsname parser treats invalid label length as compression #4851

stbuehler opened this Issue Jan 3, 2017 · 0 comments


None yet
2 participants

stbuehler commented Jan 3, 2017

  • Program: all using the dnsname parser (probably all)
  • Issue type: Bug report

Short description uses if(labellen & 0xc0) to check for compression; so any label length octet with 0x80 or 0x40 bit set is treated as compressed reference, but compression should check for both bits being set, i.e. if(0xc0 == (labellen & 0xc0)).

Other information

0x40 and 0x80 are reserver for future use; if those two variants are actually allowed in the future, both ends would have to negotiate their use, as otherwise the other end would only see garbage.

Therefore it should be unlikely that this matters a lot - until pdns negotiates such future standard it doesn't need to handle it, and handling it wrong shouldn't break much, but it should be fixed anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment