Bug 969260 - SELinux is preventing /usr/bin/gdb from using the 'ptrace' accesses on a process.
SELinux is preventing /usr/bin/gdb from using the 'ptrace' accesses on a proc...
Product: Fedora
Classification: Fedora
Component: libvirt (Show other bugs)
i686 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Libvirt Maintainers
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-05-31 00:16 EDT by Munawar Ahmed
Modified: 2013-08-31 10:36 EDT (History)
14 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-08-31 10:36:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Munawar Ahmed 2013-05-31 00:16:04 EDT
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_tcg_t by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
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_tcg_t:s0:c363,c972
Target Context                unconfined_u:system_r:svirt_tcg_t:s0:c363,c972
Target Objects                 [ process ]
Source                        gdb
Source Path                   /usr/bin/gdb
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           gdb-7.6-28.fc19.i686
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.2-301.fc19.i686 #1 SMP Mon May
                              13 12:57:34 UTC 2013 i686 i686
Alert Count                   1
First Seen                    2013-05-16 01:00:10 PKT
Last Seen                     2013-05-16 01:00:10 PKT
Local ID                      3cb90a35-585a-444b-b850-efbbe3329214

Raw Audit Messages
type=AVC msg=audit(1368648010.770:434): avc:  denied  { ptrace } for  pid=12076 comm="gdb" scontext=unconfined_u:system_r:svirt_tcg_t:s0:c363,c972 tcontext=unconfined_u:system_r:svirt_tcg_t:s0:c363,c972 tclass=process

type=SYSCALL msg=audit(1368648010.770:434): arch=i386 syscall=ptrace success=no exit=EACCES a0=10 a1=2708 a2=0 a3=0 items=0 ppid=12072 pid=12076 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 ses=2 tty=(none) comm=gdb exe=/usr/bin/gdb subj=unconfined_u:system_r:svirt_tcg_t:s0:c363,c972 key=(null)

Hash: gdb,svirt_tcg_t,svirt_tcg_t,process,ptrace

Additional info:
reporter:       libreport-2.1.4
hashmarkername: setroubleshoot
kernel:         3.9.4-300.fc19.i686
type:           libreport
Comment 1 Miroslav Grepl 2013-06-04 07:56:42 EDT
What were you doing when this happened?
Comment 2 Daniel Walsh 2013-06-07 16:35:35 EDT
Should we allow svirt processes to ptrace themselves?
Comment 3 Cole Robinson 2013-08-31 10:36:46 EDT
No response from the reporter for months, closing

Note You need to log in before you can comment on or make changes to this bug.