Bug 540335

Summary: SELinux is preventing /usr/bin/mono "ioctl" access on /dev/sdd1.
Product: [Fedora] Fedora Reporter: Edofin <Edofin>
Component: podsleuthAssignee: Christian Krause <chkr>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: chkr, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:a01ffefc875e6e53e470c44214461d1e794bca0190d8c7dee530c77a14966c06
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-11-23 22:28:09 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 Edofin 2009-11-23 03:56:46 UTC
Summary:

SELinux is preventing /usr/bin/mono "ioctl" access on /dev/sdd1.

Detailed Description:

[SELinux is in permissive mode. This access was not denied.]

SELinux denied access requested by mono. It is not expected that this access is
required by mono and this access may signal an intrusion attempt. It is also
possible that the specific version or configuration of the application is
causing it to require additional access.

Allowing Access:

You can generate a local policy module to allow this access - see FAQ
(http://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385) Please file a bug
report.

Additional Information:

Source Context                system_u:system_r:podsleuth_t:s0
Target Context                system_u:object_r:fixed_disk_device_t:s0
Target Objects                /dev/sdd1 [ blk_file ]
Source                        mono
Source Path                   /usr/bin/mono
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           mono-core-2.4.2.3-2.fc12
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-41.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.31.5-127.fc12.x86_64 #1 SMP Sat Nov 7 21:11:14
                              EST 2009 x86_64 x86_64
Alert Count                   1
First Seen                    Sun 22 Nov 2009 05:45:26 PM MST
Last Seen                     Sun 22 Nov 2009 05:45:26 PM MST
Local ID                      480364ec-7a4a-4a1a-abed-15169e53e3bc
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1258937126.355:24585): avc:  denied  { ioctl } for  pid=20784 comm="mono" path="/dev/sdd1" dev=tmpfs ino=399981 scontext=system_u:system_r:podsleuth_t:s0 tcontext=system_u:object_r:fixed_disk_device_t:s0 tclass=blk_file

node=(removed) type=SYSCALL msg=audit(1258937126.355:24585): arch=c000003e syscall=16 success=yes exit=0 a0=5 a1=2285 a2=7fffa8ac1e80 a3=7fffa8ac1c10 items=0 ppid=20779 pid=20784 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="mono" exe="/usr/bin/mono" subj=system_u:system_r:podsleuth_t:s0 key=(null)



Hash String generated from  selinux-policy-3.6.32-41.fc12,catchall,mono,podsleuth_t,fixed_disk_device_t,blk_file,ioctl
audit2allow suggests:

#============= podsleuth_t ==============
allow podsleuth_t fixed_disk_device_t:blk_file ioctl;

Comment 1 Daniel Walsh 2009-11-23 16:18:59 UTC
Does not seem like something podsleuth should be doing.  Do you have any idea what caused this?

Comment 2 Christian Krause 2009-11-23 22:28:09 UTC
(In reply to comment #1)
> Does not seem like something podsleuth should be doing.  Do you have any idea
> what caused this?  

Yes, that's the default behaviour of podsleuth:

To read the serial number and the property list it will use the
"sg_ll_inquiry" function from libsgutils to do an SCSI_INQUIRY for a couple of
pages (this will cause selinux errors for open, getattr and ioctl).

Please see for details BZ #533399.

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