libreport version: 2.0.8 executable: /usr/bin/python hashmarkername: setroubleshoot kernel: 3.3.0-0.rc6.git0.2.fc17.x86_64 reason: SELinux is preventing /usr/bin/gdb from using the 'ptrace' accesses on a process. time: Thu 08 Mar 2012 06:36:03 PM EST description: :SELinux is preventing /usr/bin/gdb from using the 'ptrace' accesses on a process. : :***** Plugin catchall_boolean (89.3 confidence) suggests ******************* : :If you want to deny_ptrace :Then you must tell SELinux about this by enabling the 'deny_ptrace'boolean. :Do :setsebool -P deny_ptrace 0 : :***** Plugin catchall (11.6 confidence) suggests *************************** : :If you believe that gdb should be allowed ptrace access on processes labeled unconfined_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:unconfined_r:unconfined_t:s0 :Target Context unconfined_u:unconfined_r:unconfined_t:s0 :Target Objects [ process ] :Source gdb :Source Path /usr/bin/gdb :Port <Unknown> :Host (removed) :Source RPM Packages gdb-7.4.50.20120120-28.fc17.x86_64 :Target RPM Packages :Policy RPM selinux-policy-3.10.0-95.fc17.noarch :Selinux Enabled True :Policy Type targeted :Enforcing Mode Enforcing :Host Name (removed) :Platform Linux (removed) : 3.3.0-0.rc6.git0.2.fc17.x86_64 #1 SMP Mon Mar 5 : 16:54:07 UTC 2012 x86_64 x86_64 :Alert Count 3 :First Seen Thu 08 Mar 2012 05:41:08 PM EST :Last Seen Thu 08 Mar 2012 06:34:46 PM EST :Local ID 059d38cb-3358-4d7c-9682-e9104aeda79e : :Raw Audit Messages :type=AVC msg=audit(1331249686.474:3312): avc: denied { ptrace } for pid=29218 comm="gdb" scontext=unconfined_u:unconfined_r:unconfined_t:s0 tcontext=unconfined_u:unconfined_r:unconfined_t:s0 tclass=process : : :type=SYSCALL msg=audit(1331249686.474:3312): arch=x86_64 syscall=ptrace success=no exit=EACCES a0=10 a1=5d84 a2=0 a3=0 items=0 ppid=25154 pid=29218 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 tty=(none) ses=1 comm=gdb exe=/usr/bin/gdb subj=unconfined_u:unconfined_r:unconfined_t:s0 key=(null) : :Hash: gdb,unconfined_t,unconfined_t,process,ptrace : :audit2allowunable to open /sys/fs/selinux/policy: Permission denied : : :audit2allow -Runable to open /sys/fs/selinux/policy: Permission denied : :
The alert tells you what to do, We have a bugzilla open on gdb to tell you this also, and hope to get a change into the kernel where gdb EXEC Is legal and gdb -P PID Is illegal with the boolean turned on.
Why this alert happens? I have such alert,
Recently, I have this alert several times a day. This did not exist before. what happens?
I have Fedora 17 installed on four computers, this alert appears only on one.
MikHail what AVC's are you seeing? What is the setting of deny_ptrace getsebool deny_ptrace
$ getsebool deny_ptrace deny_ptrace --> on
So if you want to allow this you would have to turn off the deny_ptrace.