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

.so files are chmod +x in binary bundle #3091

Open
dae opened this issue Mar 24, 2024 · 1 comment
Open

.so files are chmod +x in binary bundle #3091

dae opened this issue Mar 24, 2024 · 1 comment

Comments

@dae
Copy link
Member

dae commented Mar 24, 2024

Libraries (*.so and .so. files) do not require the executable bit (x) to be set in Linux.

Originally reported on https://forums.ankiweb.net/t/security-possible-privilege-escalation-due-to-file-permissions/42762

@jthulhu
Copy link
Contributor

jthulhu commented Mar 28, 2024

I think this is not an issue. It's not uncommon for shared objects to have the executable bit set, and distro policies about whether libraries should be packaged with the executable flag set have changed over the years (see this on the Debian mailing list). Some libraries are actually executable (for instance, glibc.so prints its version), but on some (old) Unix systems the permission flags are used to set the permissions to the memory their loaded into on mmap, so for those systems it's actually necessary for a so file to be executable (see this SO answer).

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