-
Notifications
You must be signed in to change notification settings - Fork 53
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
Does bcrypt need an execstack? #17
Comments
When I look for permissions of libbcrypt in /usr/local/lib64, this it the output:
|
I disabled the execstack and everything works fine. But shouldn't it be the default? |
On which architecture are you running libbcrypt? |
I am on Intel's x86 @kriive |
Okok, I'm working on a version where execstack is disabled: https://github.com/kriive/libbcrypt/tree/fix/issue-17 |
Thanks a lot. But I am curious to know under what circumstance does libbcrypt use an exec stack because I have it disabled. I am not a security expert but isn't it a security vulnerability? @kriive |
Yes, it could lead to a security vuln. libbcrypt does not need an executable stack. We should mark libbcrypt's stack as not executable asap. |
Thank God it does not use an exec stack. Because it might have failed at times if it needed and exec stack as I had disabled it. Don't know how it slipped everyone's eyes. Thanks for the help. I really appreciate the quick response @kriive |
@kriive can you point out how to mark the stack? I'm not a selinux expert myself but I'd like to get this issue resolved. |
I cloned and downloaded bcrypt as per instructions. I wrote this sample code:
I compiled using
g++ test.cpp -lbcrypt -Wl,-rpath=/usr/local/lib64
and it works. I then tried to incorporate bcrypt in my web app. The goal of the app is to add-users to a database. I am using bcrypt to hash the passwords. But my error_log says thaterror while loading shared libraries: libbcrypt.so.1: cannot enable executable stack as shared object requires: Permission denied
If I disable SELinux, it works. But I don't want to do it. So I wanted to ask if bcrypt actually needs and executable stack? I am asking this cause one of the solutions when I googled the issue was to disable creation of executable stack for that library.
I am using fastcgi++ on Fedora 29 Workstation
The text was updated successfully, but these errors were encountered: