Bug 578338 - SELinux is preventing /usr/libexec/hald-probe-volume "ioctl" access to device /dev/dm-15.
Summary: SELinux is preventing /usr/libexec/hald-probe-volume "ioctl" access to device...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 12
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:7c818e4bff8...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-03-30 23:21 UTC by Cristian Ciupitu
Modified: 2010-04-20 13:19 UTC (History)
2 users (show)

Fixed In Version: selinux-policy-3.6.32-110.fc12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-04-20 13:19:56 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Cristian Ciupitu 2010-03-30 23:21:27 UTC
Summary:

SELinux is preventing /usr/libexec/hald-probe-volume "ioctl" access to device
/dev/dm-15. I was mounting an encrypted LUKS partition from an external disk using GNOME (nautilus).

Detailed Description:

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

SELinux has denied hald-probe-volu "ioctl" access to device /dev/dm-15.
/dev/dm-15 is mislabeled, this device has the default label of the /dev
directory, which should not happen. All Character and/or Block Devices should
have a label. You can attempt to change the label of the file using restorecon
-v '/dev/dm-15'. If this device remains labeled device_t, then this is a bug in
SELinux policy. Please file a bg report. If you look at the other similar
devices labels, ls -lZ /dev/SIMILAR, and find a type that would work for
/dev/dm-15, you can use chcon -t SIMILAR_TYPE '/dev/dm-15', If this fixes the
problem, you can make this permanent by executing semanage fcontext -a -t
SIMILAR_TYPE '/dev/dm-15' If the restorecon changes the context, this indicates
that the application that created the device, created it without using SELinux
APIs. If you can figure out which application created the device, please file a
bug report against this application.

Allowing Access:

Attempt restorecon -v '/dev/dm-15' or chcon -t SIMILAR_TYPE '/dev/dm-15'

Additional Information:

Source Context                system_u:system_r:hald_t:s0
Target Context                system_u:object_r:device_t:s0
Target Objects                /dev/dm-15 [ blk_file ]
Source                        hald-probe-volu
Source Path                   /usr/libexec/hald-probe-volume
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           hal-0.5.13-9.fc12
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-106.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Plugin Name                   device
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.32.10-90.fc12.x86_64 #1 SMP Tue Mar 23
                              09:47:08 UTC 2010 x86_64 x86_64
Alert Count                   1
First Seen                    Wed 31 Mar 2010 02:07:59 AM EEST
Last Seen                     Wed 31 Mar 2010 02:07:59 AM EEST
Local ID                      fc9ca3e7-84d3-4273-b1a6-52922dae8afb
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1269990479.62:75): avc:  denied  { ioctl } for  pid=6792 comm="hald-probe-volu" path="/dev/dm-15" dev=devtmpfs ino=92651 scontext=system_u:system_r:hald_t:s0 tcontext=system_u:object_r:device_t:s0 tclass=blk_file

node=(removed) type=SYSCALL msg=audit(1269990479.62:75): arch=c000003e syscall=16 success=yes exit=0 a0=4 a1=1268 a2=7fffb0dc0e08 a3=7fffb0dc0ac0 items=0 ppid=2077 pid=6792 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="hald-probe-volu" exe="/usr/libexec/hald-probe-volume" subj=system_u:system_r:hald_t:s0 key=(null)



Hash String generated from  device,hald-probe-volu,hald_t,device_t,blk_file,ioctl
audit2allow suggests:

#============= hald_t ==============
allow hald_t device_t:blk_file ioctl;

Comment 1 Daniel Walsh 2010-03-31 14:28:48 UTC
What tool were you using that created /dev/dm-15?

It is labeled incorrectly.

Comment 2 Cristian Ciupitu 2010-03-31 16:12:14 UTC
What tools do you have in mind? I haven't created explicitly any device nor changed its SELinux attributes. Also, when my computer booted an autorelabel was done.

Comment 3 Daniel Walsh 2010-03-31 18:33:35 UTC
I guess you were using nautilus.

> I was mounting an encrypted LUKS partition from an external disk
using GNOME (nautilus).

What context does 

ls -lZ /dev/dm-15

show now.

Comment 4 Cristian Ciupitu 2010-03-31 20:54:59 UTC
brw-rw----. root disk system_u:object_r:fixed_disk_device_t:s0 /dev/dm-15

Btw, I've run restorecon -v on the file and it hasn't displayed anything.

Comment 5 Daniel Walsh 2010-03-31 22:00:00 UTC
Yes it has the correct context on it now.

Miroslav add

dev_manage_generic_blk_files(hald_t)

Comment 6 Miroslav Grepl 2010-04-02 08:03:59 UTC
Fixed in selinux-policy-3.6.32-109.fc12

Comment 7 Fedora Update System 2010-04-09 13:25:56 UTC
selinux-policy-3.6.32-110.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-110.fc12

Comment 8 Fedora Update System 2010-04-10 10:30:48 UTC
selinux-policy-3.6.32-110.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update selinux-policy'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-110.fc12

Comment 9 Fedora Update System 2010-04-20 13:19:20 UTC
selinux-policy-3.6.32-110.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.


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