Skip to content

resolve: do not request DS record when RR does not match the original question - #9861

Closed
yuwata wants to merge 1 commit into
systemd:masterfrom
yuwata:fix-9771
Closed

yuwata wants to merge 1 commit into
systemd:masterfrom
yuwata:fix-9771

Conversation

@yuwata

@yuwata yuwata commented Aug 12, 2018

Copy link
Copy Markdown
Member

This effectively reverts 6993d26.

Fixes #9771.

@yuwata yuwata added the resolve label Aug 12, 2018
@yuwata

yuwata commented Aug 12, 2018

Copy link
Copy Markdown
Member Author

I am not a DNS expert, so I am not sure that this is a right way to fix the issue. But at least, this solves #9771.

@letoams

letoams commented Nov 30, 2018

Copy link
Copy Markdown

Based on a quick look of the commit, it seems the code might be making a wrong assumption about the DS record. This record lives at the parent, not the child. So a DS query for amazon.com gives a SOA of .com and not amazon.com in its NXDOMAIN reply. It appears the code might be thinking that is wrong because it asked about amazon.com and not .com

@yuwata

yuwata commented Dec 14, 2018

Copy link
Copy Markdown
Member Author

@letoams Thank you for the comment and sorry for late reply. Unfortunately, I do not have enough knowledge to improve or fix the point you explained...

@poettering Please reject this if it is not a correct way to fix the issue. This may be just a workaround for the issue.

@makotom

makotom commented Dec 14, 2018

Copy link
Copy Markdown

Hmmm... Need some further review?

Based on my understanding (upon my quick review), the change made by @yuwata is to just ignore NS and SOA records which are not explicitly requested.
Therefore, the change itself should not affect how DS records are requested and handled.
In this case, this change is good to go at this point.

Nevertheless, @letoams's point that a DS record for a domain resides in its parent is correct. It could be a reason to block this change, if applicable (i.e. if this change affects how DS records are handled), or it could lead to another independent issue that DS records are not appropriately handled by resolved in general.

@poettering

Copy link
Copy Markdown
Member

Hmm, so this change means we won't attempt to request the RRs necessary to authenticate the SOAs on negative replies, thus we have no TTL info for negative caching (because for negative replies the TTL info is found in the SOAs). Which isn't horrible, but of course, we'd like to do negative caching and hence not ideal.

I have prepped #11194 now, with an alternative fix. We'll still request the RRs necessary to authenticate SOAs on negative reply, but are a bit less eager and only request those which actually could contain TTL info for us, i.e. parent domains in some form or another. Why does this matter? the transaction logic has a cyclic dep detector: when we request some RR for authenticating some other RR and then that one requests another one, and so on, and this is eventually comes back to the original RR we have a problem and hence detect that and handle it. This can happen if we are too eager to authenticate.

With the tighter check we can be sure we won't end up in a cyclic dep, since we'll only authenticate SOAs "upwards", and all is good.

Closing this, I hope this is OK.

@poettering poettering closed this Dec 17, 2018
@yuwata
yuwata deleted the fix-9771 branch December 18, 2018 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

4 participants