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

Dead Loop in DNS resolver #8687

Closed
slggamerTrue opened this issue Dec 26, 2018 · 4 comments
Closed

Dead Loop in DNS resolver #8687

slggamerTrue opened this issue Dec 26, 2018 · 4 comments
Assignees
Labels
Milestone

Comments

@slggamerTrue
Copy link

Problem

There is a dead loop in DnsResolveContext.onExpectedResponse when there is a loop in the CNAMES
image

We found this problem because one DNS meet the problem
image

Steps to reproduce

There is a small chance that the "www.altura.org" would response the loop CNAME. It's easy to reproduce the problem by your own DNS server.
The same case can be handled by the JDK DNS Resolver.

Netty version

4.1.27

JVM version (e.g. java -version)

JDK 1.8.181

OS version (e.g. uname -a)

Centos 7.0

@normanmaurer
Copy link
Member

@slggamerTrue thanks for reporting. Let me come up with a unit test and fix.

normanmaurer added a commit that referenced this issue Dec 27, 2018
Motivation:

We do not correctly detect loops when follow CNAMEs and so may try to follow it without any success.

Modifications:

- Correctly detect CNAME loops
- Do not cache CNAME entries which point to itself
- Add unit test.

Result:

Fixes #8687.
@normanmaurer
Copy link
Member

@slggamerTrue can you test #8691 ?

@normanmaurer normanmaurer added this to the 4.1.33.Final milestone Dec 27, 2018
@normanmaurer normanmaurer self-assigned this Dec 27, 2018
@slggamerTrue
Copy link
Author

Thanks @normanmaurer. The fix is perfect. Looking forward to the new release.

@normanmaurer
Copy link
Member

@slggamerTrue thanks for checking and reporting

normanmaurer added a commit that referenced this issue Jan 14, 2019
Motivation:

We do not correctly detect loops when follow CNAMEs and so may try to follow it without any success.

Modifications:

- Correctly detect CNAME loops
- Do not cache CNAME entries which point to itself
- Add unit test.

Result:

Fixes #8687.
normanmaurer added a commit that referenced this issue Jan 14, 2019
Motivation:

We do not correctly detect loops when follow CNAMEs and so may try to follow it without any success.

Modifications:

- Correctly detect CNAME loops
- Do not cache CNAME entries which point to itself
- Add unit test.

Result:

Fixes #8687.
normanmaurer added a commit that referenced this issue Jan 14, 2019
Motivation:

We do not correctly detect loops when follow CNAMEs and so may try to follow it without any success.

Modifications:

- Correctly detect CNAME loops
- Do not cache CNAME entries which point to itself
- Add unit test.

Result:

Fixes #8687.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants