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

Can we get a better error message for noexec /tmp? #4548

Open
mk-pmb opened this issue Nov 21, 2019 · 6 comments
Open

Can we get a better error message for noexec /tmp? #4548

mk-pmb opened this issue Nov 21, 2019 · 6 comments
Labels
pull-request wanted Please submit a pull-request for this, maintainers will not actively work on this.

Comments

@mk-pmb
Copy link

mk-pmb commented Nov 21, 2019

Hi! Not sure if this is a pyinstaller bug, or a problem with the way Ubuntu bundles docker-compose. However, pyinstaller seems like the most central place to fix it:

error while loading shared libraries: libz.so.1: failed to map segment from shared object: Operation not permitted

Could we give a more helpful error message here, to remind users of bundled programs that it's about /tmp being mounted noexec?

This issue is intended to improve the experience for users of bundled programs.
#3870 is a related issue, but as I understand it, from the bundle provider's view.

@LevN0
Copy link

LevN0 commented Nov 30, 2019

Ideally pyi_test_temp_path could be modified to check if path is noexec.

The code currently tries /tmp, /var/tmp and /usr/tmp, there is a good chance at least one of those is not mounted noexec. But currently only a mkdtemp check exists, no mount.

@mk-pmb
Copy link
Author

mk-pmb commented Nov 30, 2019

Nice, thanks for pointing me to that part of the code! I'll prepare a PR.

@mk-pmb
Copy link
Author

mk-pmb commented Nov 30, 2019

Sorry for the too-early optimism. I had somehow assumed pyinstaller was written in python. :-D Let's hope someone else jumps in.

@mk-pmb
Copy link
Author

mk-pmb commented Nov 30, 2019

The code currently tries /tmp, /var/tmp and /usr/tmp, there is a good chance at least one of those is not mounted noexec.

We might add /var/cache/pyinstaller/tmp+exec as first priority, so admins with a thorough lockdown mindset can arrange special circumstances for their precious special snowflakes.

@htgoebel htgoebel added the pull-request wanted Please submit a pull-request for this, maintainers will not actively work on this. label Jan 17, 2020
@simeononsecurity
Copy link

Would like to see this fixed.

@siddjellali
Copy link

UP ! I would like to see this fixed as well 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pull-request wanted Please submit a pull-request for this, maintainers will not actively work on this.
Projects
None yet
Development

No branches or pull requests

5 participants