Previous Entry Share Next Entry
Fedora 17 New SELinux Feature part I - deny_ptrace
The deny_ptrace feature allows an administrator to toggle the ability of processes on the computer system from examining other processes on the system, including user processes.   It can even block processes running as root.

Most people do not realize that any program they run can examine the memory of any other process run by them.  Meaning the computer game you are running on your desktop can watch everything going on in Firefox or a programs like pwsafe or kinit or other program that attempts to hide passwords..

SELinux defines this access as ptrace and sys_ptrace.  These accesses allow one process to read the memory of another process.   ptrace allows developers and administrators to debug how a process is running using tools like strace, ptrace and gdb.    You can even use gdb (GNU Debugger) to manipulate another process running memory and environment. 

The problem is this is allowed by default. 

My wife does not debug programs, why is she allowed to debug them?  As a matter of fact most of the time, I am not debugging applications, so it would be more secure if we could disable it by default.

I created a feature for Fedora 17 called SELinuxDenyPtrace

Here is a youtube video demonstrating the SELinuxDenyPtrace feature.

Check it out.

  • 1

what about a trace domain?

Just a thought:
If you disable ptrace in all domains except for a restricted trace domain which your debuggers run as (maybe limit write, etc) and only allow transition to this domain from a programer unconfined domain which would otherwise be identical to your user unconfined domain this might accomplish what you want with fewer knobs. Although your uber programmers may want a knob for writing debuggers.

Re: what about a trace domain?

I actually think that would be more difficult to do then just have the boolean. Since I would be by default having all users as unconfined_t then a programmer would need to setup debugger_t or something like that.

  • 1

Log in