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

Disable executable stack #28

Closed
koczkatamas opened this issue Jan 26, 2018 · 1 comment
Closed

Disable executable stack #28

koczkatamas opened this issue Jan 26, 2018 · 1 comment

Comments

@koczkatamas
Copy link

koczkatamas commented Jan 26, 2018

sslyze does not work on Windows WSL (tested on Ubuntu 16.04.3 LTS, installed via pip) because nassl is compiled with executable stack.

I think executable stack is not necessary for nassl to work properly, because if I disable it, then sslyze seemingly works correctly. On the other hand enabling executable stack imposes a security risk.

The related WSL issue: microsoft/WSL#2866

Turning executable stack off (for testing purposes):

sslyze ... => exception
sudo apt install execstack
sudo execstack -c /usr/local/lib/python2.7/dist-packages/nassl/_nassl.so
sudo execstack -c /usr/local/lib/python2.7/dist-packages/nassl/_nassl_legacy.so
sslyze ... => works

A related cryptography package issue (pyca/cryptography#3993) links to an openssl issue (openssl/openssl#4575) where they say that

all the linux distros work around this by providing the -Wa,--noexecstack incantation, but people who compile their own OpenSSL do not get these protections.

So it may resolve the issue if you add -Wa,--noexecstack to the appropriate configure script.

You can check whether the library is compiled with executable stack or not like this:

Compiled without executable stack (expected / good state):

$ execstack _nassl.so
- _nassl.so

Compiled with executable stack (current / bad state):

$ execstack _nassl.so
X _nassl.so
@nabla-c0d3
Copy link
Owner

Thanks for the details! I actually was running into this problem constantly as I do my Linux dev on WSL.

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

No branches or pull requests

2 participants