<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 24 February 2016 at 21:28, Cory Benfield <span dir="ltr"><<a href="mailto:cory@lukasa.co.uk" target="_blank">cory@lukasa.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
> On 24 Feb 2016, at 10:32, Nick Coghlan <<a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>> wrote:<br>
><br>
> Security Considerations<br>
> -----------------------<br>
><br>
> Relative to the behaviour in Python 3.4.3+ and Python 2.7.9->2.7.11, this<br>
> approach does introduce a new downgrade attack against the default security<br>
> settings that potentially allows a sufficiently determined attacker to revert<br>
> Python to the default behaviour used in CPython 2.7.8 and earlier releases.<br>
> However, such an attack requires the ability to modify the execution<br>
> environment of a Python process prior to the import of the ``ssl`` module,<br>
> and any attacker with such access would already be able to modify the<br>
> behaviour of the underlying OpenSSL implementation.<br>
><br>
<br>
</span>I’m not entirely sure this is accurate. Specifically, an attacker that is able to set environment variables but nothing else (no filesystem access) would be able to disable hostname validation.</blockquote><div><br></div><div>... for SSL contexts that aren't explicitly enabling it.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">To my knowledge this is the only environment variable that could be set that would do that.<br>
<br>
It’s just worth noting here that this potentially opens a little crack in Python’s armour.<br></blockquote><div><br></div><div>Only in Python 2.7's, and there we have a much bigger problem with folks not upgrading past 2.7.8, and with a number of redistributors considering the change too disruptive to backport as a security fix.<br></div></div><br></div><div class="gmail_extra">I do think you're right though, so I'll tweak the wording of that section accordingly.<br><br></div><div class="gmail_extra">Cheers,<br></div><div class="gmail_extra">Nick.<br clear="all"></div><div class="gmail_extra"><br>-- <br><div class="gmail_signature">Nick Coghlan   |   <a href="mailto:ncoghlan@gmail.com" target="_blank">ncoghlan@gmail.com</a>   |   Brisbane, Australia</div>
</div></div>