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

cannot enable executable stack as shared object requires: Invalid argument #916

Closed
JMoVS opened this issue Aug 16, 2016 · 12 comments
Closed

Comments

@JMoVS
Copy link

JMoVS commented Aug 16, 2016

  • I am trying to get started with linuxbrew on lxss and stumbled into a couple of issues. With this one, the linuxbrew maintainer doesn't have a clue. https://github.com/Linuxbrew/homebrew-core/issues/765
  • I'd expect a compilation of ruby to work. Maybe it is dependend on open-ssl having this (might be the case).
  • Best and most complete info is in the bottom of the linked thread in the gist - there, pretty much all logs are in there. Also referenced is my original issue at linuxbrew trying to compile openssl.
  • Install linuxbrew, set the environment variable to compile everything from source as described here https://github.com/Linuxbrew/homebrew-core/issues/761#issuecomment-239625103
  • Strace of the failing command I don't know how to do that.
@stehufntdev
Copy link
Collaborator

Thanks for reporting the issue. This is the same as #286 that you commented on earlier so closing this out as a duplicate. Please give us feedback on the user voice page so we can prioritize.

@JMoVS
Copy link
Author

JMoVS commented Aug 17, 2016

are you absolutely sure it is the exact same issue and not just the same symptom?

@stehufntdev
Copy link
Collaborator

"...in this world nothing can be said to be certain, except death and taxes." - Ben Franklin.

More seriously though :), the error string above is hardcoded into the glibc loader (see dl-load.c) so I'm pretty sure it's the same issue. If you want to confirm please take a strace and check for a failure with PROT_GROWSDOWN like the other post.

@ghost
Copy link

ghost commented Nov 26, 2016

I just ran into this issue when trying to get Swift 3.0.1 running under WSL on Windows 14965.

Had to clear the executable stack flag in libFoundation.so ("execstack -c <pathToSwift>/usr/lib/swift/linux/libFoundation.so"), but once I did that helloworld.swift demo ran using "swift helloworld.swift".

@Hickory420
Copy link

Hickory420 commented Aug 22, 2017

Issue with ansible-vault. Here is the trace stack running Windows 10 Pro Build 15063

$ echo -n "the plaintext to encrypt" | ansible-vault encrypt_string -vvv
No config file found; using defaults
New Vault password:
Confirm New Vault password:
Reading plaintext input from stdin. (ctrl-d to end input)
ERROR! Unexpected Exception: /home/hickory/.local/lib/python3.5/site-packages/cryptography/hazmat/bindings/_openssl.abi3.so: cannot enable executable stack as shared object requires: Invalid argument
the full traceback was:

Traceback (most recent call last):
  File "/home/hickory/.local/bin/ansible-vault", line 109, in <module>
    exit_code = cli.run()
  File "/home/hickory/.local/lib/python3.5/site-packages/ansible/cli/vault.py", line 158, in run
    self.execute()
  File "/home/hickory/.local/lib/python3.5/site-packages/ansible/cli/__init__.py", line 149, in execute
    fn()
  File "/home/hickory/.local/lib/python3.5/site-packages/ansible/cli/vault.py", line 269, in execute_encrypt_string
    outputs = self._format_output_vault_strings(b_plaintext_list)
  File "/home/hickory/.local/lib/python3.5/site-packages/ansible/cli/vault.py", line 299, in _format_output_vault_strings
    b_ciphertext = self.editor.encrypt_bytes(b_plaintext)
  File "/home/hickory/.local/lib/python3.5/site-packages/ansible/parsing/vault/__init__.py", line 415, in encrypt_bytes
    b_ciphertext = self.vault.encrypt(b_plaintext)
  File "/home/hickory/.local/lib/python3.5/site-packages/ansible/parsing/vault/__init__.py", line 209, in encrypt
    b_ciphertext = this_cipher.encrypt(b_plaintext, self.b_password)
  File "/home/hickory/.local/lib/python3.5/site-packages/ansible/parsing/vault/__init__.py", line 748, in encrypt
    b_key1, b_key2, b_iv = self._gen_key_initctr(b_password, b_salt)
  File "/home/hickory/.local/lib/python3.5/site-packages/ansible/parsing/vault/__init__.py", line 729, in _gen_key_initctr
    backend = default_backend()
  File "/home/hickory/.local/lib/python3.5/site-packages/cryptography/hazmat/backends/__init__.py", line 15, in default_backend
    from cryptography.hazmat.backends.openssl.backend import backend
  File "/home/hickory/.local/lib/python3.5/site-packages/cryptography/hazmat/backends/openssl/__init__.py", line 7, in <module>
    from cryptography.hazmat.backends.openssl.backend import backend
  File "/home/hickory/.local/lib/python3.5/site-packages/cryptography/hazmat/backends/openssl/backend.py", line 53, in <module>
    from cryptography.hazmat.bindings.openssl import binding
  File "/home/hickory/.local/lib/python3.5/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 13, in <module>
    from cryptography.hazmat.bindings._openssl import ffi, lib
ImportError: /home/hickory/.local/lib/python3.5/site-packages/cryptography/hazmat/bindings/_openssl.abi3.so: cannot enable executable stack as shared object requires: Invalid argument

@guisea
Copy link

guisea commented Sep 15, 2017

@Hickory420 I encounter the same problem with latest version of ansible. Downgrading cryptography fixed this problem for me.
pip install --upgrade --user 'cryptography==1.9'

ansible-vault is now working.

@GiedriusM
Copy link

Thanks, @guisea! Running pip install --upgrade --user 'cryptography==1.9' fixed the issue for me too.

dhermes added a commit to dhermes/bezier that referenced this issue Oct 9, 2017
dhermes added a commit to dhermes/bezier that referenced this issue Oct 13, 2017
@mhils
Copy link

mhils commented Oct 23, 2017

The lastest cryptography release can be used, but it needs to be manually compiled:

# Install build dependencies - see https://cryptography.io/en/latest/installation/
sudo apt-get install build-essential libssl-dev libffi-dev python3-dev 
pip3 install cryptography --no-binary cryptography

@phuicy
Copy link

phuicy commented Feb 15, 2018

This error appears to be fixable, using execstack

sudo apt-get install prelink
sudeo execstack -c /usr/local/lib/opencv.so*

@JianyiH
Copy link

JianyiH commented Sep 22, 2018

I solved that with execstack -c /usr/local/lib/opencv.so*

@sampleref
Copy link

I too faced same problem. Error as

"gst-inspect-1.0 dtls

(gst-plugin-scanner:26987): GStreamer-WARNING **: Failed to load plugin '/usr/local/lib/gstreamer-1.0/libgstdtls.so': libcrypto.so.1.1: cannot enable executable stack as shared object requires: Invalid argument

(gst-plugin-scanner:26987): GStreamer-WARNING **: Failed to load plugin '/usr/local/lib/gstreamer-1.0/libgstdtls.so': libcrypto.so.1.1: cannot enable executable stack as shared object requires: Invalid argument
No such element or plugin 'dtls'
"

After giving below, it resolved

execstack -c /usr/local/lib/libcrypto.so.1.1
execstack -c /usr/local/lib/libcrypto.so
execstack -c /usr/local/lib/libssl.so.1.1
execstack -c /usr/local/lib/libssl.so

Hope this helps!

@SazidRahman
Copy link

Did you find a solution for this?

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

No branches or pull requests

10 participants