-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
SSL v3 is vulnerable #487
Comments
I think this patch fixes things but I'm not very confident in it because I don't understand the underlying issues well enough, and I'm not sure what the effect will be on connections to servers that don't support TLS v1. |
@kevinburke Your patch is a troubling one. Some problems:
|
I was right not to be very confident :) Re: 3, was just following the example of |
Does anyone know what the vulnerability implications are of a library client running into the exploit? |
According to @t-8ch the attacker would need to control some data sent by the client. If the attacker can do that and the connection is ssl v3 then a middleman can read the message contents. Another attack vector is dropping enough of an attempted tls v1 connection so that the connection is downgraded to ssl v3. I am not sure whether this behavior is supported in urllib3/openssl. |
Can we please have this discussion in exactly one place?Sent from my Android device with K-9 Mail. Please excuse my brevity. |
I think there are two discussions. One is whether this should be done (yes), in urllib3. The other is how requests exposes it (user friendly). |
Sorry I was not aware there is another discussion. :/ |
So given our lowest Python version is 2.6, the best we can do is specify a strict version of TLSv1.0 (https://docs.python.org/2.6/library/ssl.html?highlight=ssl#ssl.PROTOCOL_TLSv1). 2.6 cannot handle anything newer than that. Further, we (according to Python's own docs) cannot rely on the |
No. The |
@Lukasa so we tell users on 2.6 and 2.7.x (for x < 9) that they have to explicitly remember to not use |
We could try. I don't like the solution either. =( |
Could we raise a warning if the connection ends up using ssl v3? Reading Kevin Burke On Thu, Oct 16, 2014 at 12:01 PM, Cory Benfield notifications@github.com
|
I don't believe the standard library makes it possible to determine that. PyOpenSSL does though. |
Hello,
[¹] https://packages.qa.debian.org/p/python2.7/news/20141118T160603Z.html |
@EriolV Thank you, looks good. We're aiming to remove support for it natively also. |
After a considerable amount of RTFM, I try to summarize here what I discovered, namely, that the problem is actually a conjunction of many things: * Python 2.6 and 2.7.x (with x <= 8) don't define the constants `ssl.PROTOCOL_TLSv1_1` and `ssl.PROTOCOL_TLSv1_2`. [They were introduced with Python 2.7.9][0] * Having TLS v1.1 and TLS v1.2 seem to only be available with sufficiently new versions of OpenSSL. Again, this is reading from [the Python docs][0]. * urllib3, as a result, doesn't seem to support explicitly specifying which which version of TLS to use, as far as I can see it (both by reading the reading the code and by reading urllib3/urllib3#487 (comment)). [0]: https://docs.python.org/2/library/ssl.html?highlight=ssl#ssl.PROTOCOL_TLSv1 Therefore, I guess that the best that we can do so far is to only request `ssl.PROTOCOL_TLSv1` to be used. While it seems that TLS v1.0 has issues, I hope that the packages we depend on manage to find a way to negotiate higher versions of TLS, so that we can change that accordingly in the future. A not so good alternative to that would be to decide dynamically (and monkeypatch) urllib3 to see which TLS protocols we have and what we can try to convice it to be used. Signed-off-by: Rogério Brito <rbrito@ime.usp.br>
I'm trying to figure out whether this means that urllib3 is vulnerable.
ssl_wrap_socket
method in pyopenssl.py because it takesssl_version=None
as an argument. However the first line of the method callsBut
_openssl_versions[None]
will raise a KeyError.resolve_ssl_version
which sets the version as PROTOCOL_SSLv23 if it's not explicitly set. I can't figure out where in the urllib3 code that TLS v1 gets set.I'm still trying to work through all of this.
The text was updated successfully, but these errors were encountered: