-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
axTLS-based modussl: ussl.wrap_socket silently accepts invalid certificates #1862
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
Comments
For background on the changes that were made to CPython's default behaviour in this area: https://www.python.org/dev/peps/pep-0476/ For MicroPython, the idea of relying on the system certificate stores isn't valid (since those interfaces don't exist on embedded systems), hence the idea in micropython/micropython-lib#69 (comment) of expecting either the Mozilla cert bundle or dedicated security certificates to be available when creating HTTPS connections, and refusing to create them otherwise. |
I should point out that the docs in On Sun, Feb 28, 2016 at 8:21 AM, ncoghlan notifications@github.com wrote:
|
See also https://cve.mitre.org/cgi-bin/cvename.cgi?name=2014-9365. I would argue a separate CVE should be assigned for this behaviour in micropython. |
micropython/micropython-lib#69 (comment) explains that initial user story behind ussl module was "make over-zealous HTTPS services work as HTTP". Stakeholders of other user stories are welcome to share them here, gather together, and find a solution to this issue. |
bca4c9e adds disclosure of cert validation behavior to the official docs. Note that this is first time docs for axTLS-based ussl module are published, 2 weeks after first release of the port where it was enabled (esp8266 port). unix port still doesn't have it enabled (something to do soon finally). |
wipy is not susceptible to the issue as described (it has support for cert validation; the implementation is not open-source from the upstream vendor (TI), so cannot be audited for omissions, bugs, or backdoors). |
Investigating micropython/micropython-lib#69, I found the current SSL/TLS socket creation code at
micropython/extmod/modussl.c
Line 49 in d19e4f0
If I'm reading that correctly:
This makes the documentation at http://docs.micropython.org/en/latest/library/ussl.html#ussl.ssl.wrap_socket thoroughly misleading, as even if the additional arguments are passed in, they won't be processed.
I realise actually implementing this will require a significant amount of work, so my request at this point would be for passing in unsupported arguments to result in a hard failure, rather than silently appearing to succeed without actually providing the claimed security guarantees.
The text was updated successfully, but these errors were encountered: