[root@srv-rhsoft:~]$ hardening-check.sh /usr/sbin/smbd RELRO STACK CANARY NX PIE RPATH RUNPATH FILE Partial RELRO Canary found NX enabled No PIE RPATH No RUNPATH /usr/sbin/smbd /usr/sbin/smbd: Position Independent Executable: no, normal executable! Stack protected: yes Fortify Source functions: yes (some protected functions found) Read-only relocations: yes Immediate binding: no, not found!
This will be fixed soon when Samba 4.0.7 is released.
4.0.7 is PIE but still *not* full RELO http://tk-blog.blogspot.co.at/2009/02/relro-not-so-well-known-memory.html as maintainer of server-packages you should install "checksec" and "hardening-check" which are in the Fedora repos for F18, F19 and F20 [root@srv-rhsoft:~]$ hardening-check /usr/sbin/smbd /usr/sbin/smbd: Position Independent Executable: yes Stack protected: yes Fortify Source functions: yes (some protected functions found) Read-only relocations: yes Immediate binding: no, not found! [root@srv-rhsoft:~]$ checksec --file /usr/sbin/smbd RELRO STACK CANARY NX PIE RPATH RUNPATH FILE Partial RELRO Canary found NX enabled PIE enabled RPATH No RUNPATH /usr/sbin/smbd
Ok, I will propose a patch for 4.0.8 to enable RELRO.
thx, but this can be fixed in 99% of all cases in the RPM SPEC export LDFLAGS="-Wl,-z,now -Wl,-z,relro,-z" before %configure and you are mostly done i am using this for any local maintained package as well as explicit CFLAGS for hardening with stronger options than Fedora defaults (httpd, php, dovecot, postfix, dbmail, trafficserver....) and i would like to use the fedota-samba apckages instead add it my "private builds"
argh - errata export LDFLAGS="-Wl,-z,now -Wl,-z,relro" _____________________________________ the trailing ",z" came from copy&paste of my dovecot build %build export CFLAGS="%{optflags} -fPIC -fPIE -fstack-protector-all" export CXXFLAGS="%{optflags} -fPIC -fPIE -fstack-protector-all" export FFLAGS="%{optflags} -fPIC -fPIE -fstack-protector-all" export CPPFLAGS="%{optflags} -fPIC -fPIE -fstack-protector-all" export LDFLAGS="-Wl,-z,now -Wl,-z,relro,-z,noexecstack -pie" export SH_LDFLAGS="-Wl,-z,now -Wl,-z,relro,-z,noexecstack -pie" %configure.................
samba-4.0.7-2.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/samba-4.0.7-2.fc19
that looks much better (samba-4.0.7-2.fc18.x86_64) [root@rh:~]$ hardening-check /usr/sbin/smbd /usr/sbin/smbd: Position Independent Executable: yes Stack protected: yes Fortify Source functions: yes (some protected functions found) Read-only relocations: yes Immediate binding: yes
samba-4.0.7-2.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/samba-4.0.7-2.fc18
I've also added a patch upstream which checks if the linker supports it and enables it by default!
Package samba-4.0.7-2.fc19: * should fix your issue, * was pushed to the Fedora 19 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing samba-4.0.7-2.fc19' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-13060/samba-4.0.7-2.fc19 then log in and leave karma (feedback).
samba-4.0.7-2.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report.
samba-4.0.7-2.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.