Bug 706254

Summary: SELinux is preventing /usr/bin/mono from 'setattr' accesses on the file sockcreate.
Product: [Fedora] Fedora Reporter: Robert Martin <Robert-Martin>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 14CC: dominick.grift, dwalsh, eparis, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:516c3c406da498038e05eab039fdc78e2717cdbb9143bdf6239a99cd0aae68d4
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-25 21:00:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Robert Martin 2011-05-19 21:00:21 UTC
SELinux is preventing /usr/bin/mono from 'setattr' accesses on the file sockcreate.

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

If you believe that mono should be allowed setattr access on the sockcreate file 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 beagled /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:unconfined_r:unconfined_mono_t:s0-s0:
                              c0.c1023
Target Context                system_u:system_r:devicekit_disk_t:s0-s0:c0.c1023
Target Objects                sockcreate [ file ]
Source                        beagled
Source Path                   /usr/bin/mono
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           mono-core-2.6.7-4.fc14
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.7-40.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.35.13-91.fc14.i686.PAE #1 SMP Tue May 3
                              13:29:55 UTC 2011 i686 i686
Alert Count                   5
First Seen                    Thu 19 May 2011 03:56:57 PM CDT
Last Seen                     Thu 19 May 2011 03:56:57 PM CDT
Local ID                      25022d4c-ced9-4e5c-b56a-b37d12282f96

Raw Audit Messages
type=AVC msg=audit(1305838617.424:134): avc:  denied  { setattr } for  pid=3172 comm="beagled" name="sockcreate" dev=proc ino=207277 scontext=unconfined_u:unconfined_r:unconfined_mono_t:s0-s0:c0.c1023 tcontext=system_u:system_r:devicekit_disk_t:s0-s0:c0.c1023 tclass=file


type=SYSCALL msg=audit(1305838617.424:134): arch=i386 syscall=lsetxattr per=400000 success=no exit=EACCES a0=a338128 a1=a108568 a2=14645b0 a3=4f items=0 ppid=1 pid=3172 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=3 comm=beagled exe=/usr/bin/mono subj=unconfined_u:unconfined_r:unconfined_mono_t:s0-s0:c0.c1023 key=(null)

Hash: beagled,unconfined_mono_t,devicekit_disk_t,file,setattr

audit2allow

#============= unconfined_mono_t ==============
allow unconfined_mono_t devicekit_disk_t:file setattr;

audit2allow -R

#============= unconfined_mono_t ==============
allow unconfined_mono_t devicekit_disk_t:file setattr;

Comment 1 Miroslav Grepl 2011-05-23 06:16:51 UTC
Why are you trying to set the value of the extended attributes for /proc/<pid>/attr/sockcreate

Comment 2 Miroslav Grepl 2011-05-23 06:17:22 UTC
*** Bug 706256 has been marked as a duplicate of this bug. ***

Comment 3 Daniel Walsh 2011-05-23 15:36:26 UTC
This looks like beagle doing something wacky on top of /proc?

Comment 4 Daniel Walsh 2011-05-23 15:37:20 UTC
I have a feeling this would have failed based on DAC anyways and it is just SELinux checking happening before the DAC Check

Comment 5 Miroslav Grepl 2011-05-25 21:00:13 UTC

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