From Fedora Project Wiki

< Features

Revision as of 16:12, 17 January 2012 by Dwalsh (talk | contribs) (How To Test)

Feature Name

Allow SELinux to turn off all processes ability to ptrace another process.


This change allows an administrator to prevent all processes on the system from ptrace'ing other processes on the system, including user processes. The ptrace and sys_ptracess access allows one process to read the memory of another process. It also potentially allows one process to manipulate another process, using tools like gdb.


  • Email:

Current status

  • Targeted release: [Fedora 17]
  • Last updated: Tue Jan 17 2012
  • Percentage of completion: 90%

Detailed Description

The boolean will even prevent the unconfined_t domain from being able to ptrace other domains. Because of this it will be optional and turned off by default. The goal of this change is not to prevent processes with the ability to change booleans from turning the boolean off. This means an unconfined_t process running as root could turn off the deny_ptrace boolean and start ptracing other processes. But an unconfined_t user logged into a system without root privs would not be able to ptrace another process.

Lastly this boolean will only effect policy that is shipped by Fedora, so an admin or third party can ship a package that allows ptrace. You can search for all domains that are allowed to ptrace via the following command.

  1. sesearch -A -p ptrace,sys_ptrace -C | grep -v deny_ptrace

One problem with removing the ptrace permission is currently the "ps -e" command running as root requires ptrace, we need an update to the kernel to change this.

Benefit to Fedora

The major benefit to Fedora is increased security to know that one process can not read the memory of another process. Meaning if you are running a server with lots of processes running as httpd_t or httpd_sys_content_t, they will be prevented from manipulating other process running with the same label. Similarly processes running by a user will not be able to look at the process memory of other processes. A real world security issue is that processes like gnome-keyring or ssh or firefox which decrypt an encrypted file would have the password sitting in memory. Without this feature a corrupted process would be allowed to examine the other processes memory and potentially steal the secret.


This change only effects Policy writers and the kernel. Any application like gdb that a programmer or system administrator wanted to run would require the administrator to turn this boolean off.

How To Test

Release Notes

Comments and Discussion