Bug 963954

Summary: SELinux is preventing /usr/bin/gdb from using the 'ptrace' accesses on a process.
Product: [Fedora] Fedora Reporter: Elad Alfassa <elad>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:24ca97bace046cbd7386f68996402fedb0267b79cae47ed1785f3f60c5d082af
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-05-17 07:00:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Elad Alfassa 2013-05-16 20:49:49 UTC
Description of problem:
SELinux is preventing /usr/bin/gdb from using the 'ptrace' accesses on a process.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that gdb should be allowed ptrace access on processes labeled svirt_t by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep gdb /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:system_r:svirt_t:s0:c162,c457
Target Context                unconfined_u:system_r:svirt_t:s0:c162,c457
Target Objects                 [ process ]
Source                        gdb
Source Path                   /usr/bin/gdb
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           gdb-7.6-28.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-44.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.9.1-301.fc19.x86_64 #1 SMP Wed
                              May 8 18:02:34 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-05-16 23:48:39 IDT
Last Seen                     2013-05-16 23:48:39 IDT
Local ID                      1690bae1-9503-42ac-ab80-2a1ec4a4867f

Raw Audit Messages
type=AVC msg=audit(1368737319.896:100): avc:  denied  { ptrace } for  pid=7364 comm="gdb" scontext=unconfined_u:system_r:svirt_t:s0:c162,c457 tcontext=unconfined_u:system_r:svirt_t:s0:c162,c457 tclass=process


type=SYSCALL msg=audit(1368737319.896:100): arch=x86_64 syscall=ptrace success=no exit=EACCES a0=10 a1=1c48 a2=0 a3=0 items=0 ppid=7360 pid=7364 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 ses=1 tty=(none) comm=gdb exe=/usr/bin/gdb subj=unconfined_u:system_r:svirt_t:s0:c162,c457 key=(null)

Hash: gdb,svirt_t,svirt_t,process,ptrace

audit2allow

#============= svirt_t ==============
allow svirt_t self:process ptrace;

audit2allow -RYou must regenerate interface info by running /usr/bin/sepolgen-ifgen


Additional info:
reporter:       libreport-2.1.4
hashmarkername: setroubleshoot
kernel:         3.9.1-301.fc19.x86_64
type:           libreport

Potential duplicate: bug 883556

Comment 1 Miroslav Grepl 2013-05-17 07:00:44 UTC

*** This bug has been marked as a duplicate of bug 883556 ***