From Fedora Project Wiki

(→‎SELinux Deny Ptrace: Fleshed out SELinux Deny Ptrace feature.)
(remove note on private /tmp via systemd)
(31 intermediate revisions by 9 users not shown)
Line 2: Line 2:
{{Docs_beat_open}}
{{Docs_beat_open}}


== Password Quality Checking ==
[[Category:Docs Project]]
 
[[Category:Draft documentation]]
Fedora now has a single configurable library, ''[https://fedorahosted.org/libpwquality libpwquality]'', for checking the quality of new passwords used for system accounts. The system wide password quality checks provided by this library are configured by modifying the <code>/etc/security/pwquality.conf</code> configuration file.
[[Category:Documentation beats]]
 
Developers wishing to call this API from their applications will find the API description in the <code>pwquality.h</code> file provided by the ''libpwquality-devel'' package. A python wrapper, ''python-pwquality'', is also provided.
 
<!-- http://fedoraproject.org/wiki/Features/PasswordQualityChecking -->
 
== SELinux Deny Ptrace ==
 
A new SELinux boolean, ''deny_ptrace'', has been added. It is recommended that users who do not plan to debug applications on their machine turn this boolean on. The boolean prevents rogue processes from being able to read the memory of, or otherwise attack, other processes using debugging tools including ''ptrace'' and ''gdb''.
 
Such attacks are prevented even where the rogue process is running as the root user or attacking a process running with the same SELinux context and label. To permanently enable the protection provided by the ''deny_ptrace'' boolean, execute the following command as root:
 
<code># setsebool -P deny_ptrace 1</code>


To disable the protection provided by the ''deny_ptrace'' boolean temporarily, execute the following command as root:
== Hardlink and symlink restrictions ==


<code># setsebool deny_ptrace 0</code>
A long-standing class of security issues is the link-based time-of-check-time-of-use race, most commonly seen in world-writable directories like /tmp. The common method of exploitation of this flaw is to cross privilege boundaries when following a given link (i.e. a root process follows a link belonging to another user).  In Fedora 19,  we permit links to only be followed when outside a sticky world-writable directory, or when the uid of the link and follower match, or when the directory owner matches the link's owner.  In previous releases, this was enforced by SELinux policy and in this release, we have enabled these restrictions via the following sysctl settings in /usr/lib/sysctl.d/00-system.conf as an additional layer of protection:


<!-- https://fedoraproject.org/wiki/Features/SELinuxDenyPtrace -->
fs.protected_hardlinks = 1
fs.protected_symlinks = 1


== Services Private /tmp ==
Refer to http://lwn.net/Articles/503660/ and https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=800179c9b8a1e796e441674776d11cd4c05d61d7 for more detailed information about this change.  Note that in addition to this,
 
http://fedoraproject.org/wiki/Features/ServicesPrivateTmp
 
== Secure Containers ==
 
http://fedoraproject.org/wiki/Features/Securecontainers
 
 
[[Category:Docs Project]]
[[Category:Draft documentation]]
[[Category:Documentation beats]]

Revision as of 14:10, 20 March 2013

DocsProject Header docTeam1.png
Note.png
Beat is open
This beat is now ready to have Fedora 25 content added by the beat writer

Hardlink and symlink restrictions

A long-standing class of security issues is the link-based time-of-check-time-of-use race, most commonly seen in world-writable directories like /tmp. The common method of exploitation of this flaw is to cross privilege boundaries when following a given link (i.e. a root process follows a link belonging to another user). In Fedora 19, we permit links to only be followed when outside a sticky world-writable directory, or when the uid of the link and follower match, or when the directory owner matches the link's owner. In previous releases, this was enforced by SELinux policy and in this release, we have enabled these restrictions via the following sysctl settings in /usr/lib/sysctl.d/00-system.conf as an additional layer of protection:

fs.protected_hardlinks = 1
fs.protected_symlinks = 1

Refer to http://lwn.net/Articles/503660/ and https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=800179c9b8a1e796e441674776d11cd4c05d61d7 for more detailed information about this change. Note that in addition to this,