-
Notifications
You must be signed in to change notification settings - Fork 518
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
Potential DoS via the Tudoor mechanism (CVE-2023-29483) #1045
Comments
Changes have been merged. |
hi @rthalley , We tried the latest dnspython-2.6.0rc1 to fix CVE-2023-29483. It fixes the skny monitor error, however, it seems to break the dns lookup in k8s environment, keep getting timeout errors:
when I used 'nc' or 'curl', I can see that the mongo db is actually running/listening:
Does dnspython stop supporting $app.$namespace:$port convention? Is there a get around for this timeout/dns lookup error? ex: $svc.$namespace.svc.cluster.local $port Thanks in advance! |
i ran the test code for dnspython (2.5.0) inside k8s container:
The timeout issue might be sth to do with eventlet-0.35.1. I have the below 2 lines at the beginning: import eventlet After falling back to dnspython-2.5.0, the timeout issue does not occur. However, snyk would fail due to the existence of CVE-2023-29483 in 2.5.0. |
ok, i re-produced the issue in the container with dnspython-2.6.0rc1:
It's nothing to do with k8s. with hostname 'localhost' and eventlet activated, I got the same timeout issue (about 5s). If I tested without eventlet monkey patching, it's working as expected:
This issue does not occur in dnspython-2.5.0 with eventlet monkey_patch() enabled. :
|
Here's the test code I use:
we can re-produce the timeout error by the below version: pip3 install dnspython==2.6.0rc1 After reverting back to 2.5.0, the timeout issue is gone: pip3 install dnspython==2.5.0 |
This is not a dnspython issue, but rather an eventlet issue as it monkey patches a function whose API has been extended in 2.6 to deal with the CVE, and which the resolver uses. I opened an issue there when I released the RC. Note that eventlet must replicate the fix in their monkey patched code in order to be protected against the CVE. |
Thank you so much for your quick response! @rthalley |
Dnspython 2.6.0 is now out. Note that testing in between the RC and the final release found an uncovered area of the CVE, so anyone using the RC should update to get the official fix. |
As mentioned in the "Tudoor" paper, and presumably in the CVE assigned to dnspython by the authors (CVE-2023-29483) the dnspython stub resolver is vulnerable to a potential DoS if a bad-in-some-way response from the right address and port forged by an attacker arrives before a legitimate one on the UDP port dnspython happens to be using for that single query.
While we don't think this is a huge practical threat for dnspython, we will nevertheless address the issue by adopting the recommended mitigation, which is ignoring the bad packets and continuing to listen for a legitimate response or until the allotted timeout for the query has expired.
We will issue a 2.6.0 release in the near future to address this. Because there is a small backwards compatible API change, we are not making a 2.5.1 release with this fix.
The text was updated successfully, but these errors were encountered: