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

Order of RDATA for NS and TXT records seems wrong when generating digest #2

Open
jan-lugfl opened this issue Feb 11, 2015 · 0 comments

Comments

@jan-lugfl
Copy link

I just discovered in issue with signing zones.

The zone contains TXT and NS records and currently records of same name, type and class are ordered using sorted() in sign_rrset().
But that seems to be an issue as the ordering is wrong.
RFC 4034 6.3 says:
For the purposes of DNS security, RRs with the same owner name,
class, and type are sorted by treating the RDATA portion of the
canonical form of each RR as a left-justified unsigned octet sequence
in which the absence of an octet sorts before a zero octet.

which does not seem to always be the case using sorted() and instead the canonial for of the entire record has to be used for the sorting to get the signature generated correctly.

I did a quick test by re-using code from _canonical_order() to order by rData and the issue seems to be fixed and the records could be validated then.

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

1 participant