Bug 966611 - SELinux is preventing /usr/lib/udisks2/udisksd from using the 'sys_tty_config' capabilities.
SELinux is preventing /usr/lib/udisks2/udisksd from using the 'sys_tty_config...
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-05-23 10:40 EDT by Moez Roy
Modified: 2013-06-13 08:53 EDT (History)
4 users (show)

See Also:
Fixed In Version: selinux-policy-3.11.1-97.fc18
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-05-31 00:25:34 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 Moez Roy 2013-05-23 10:40:19 EDT
Description of problem:
SELinux is preventing /usr/lib/udisks2/udisksd from using the 'sys_tty_config' capabilities.

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

If you believe that udisksd should have the sys_tty_config capability 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 udisksd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:devicekit_disk_t:s0
Target Context                system_u:system_r:devicekit_disk_t:s0
Target Objects                 [ capability ]
Source                        udisksd
Source Path                   /usr/lib/udisks2/udisksd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           udisks2-2.0.1-2.fc18.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-96.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.9.2-200.fc18.x86_64 #1 SMP Mon
                              May 13 13:59:47 UTC 2013 x86_64 x86_64
Alert Count                   2
First Seen                    2013-05-23 07:38:25 PDT
Last Seen                     2013-05-23 07:38:25 PDT
Local ID                      c9215069-b68f-45a5-9457-1e5de5cd676b

Raw Audit Messages
type=AVC msg=audit(1369319905.112:347): avc:  denied  { sys_tty_config } for  pid=1909 comm="udisksd" capability=26  scontext=system_u:system_r:devicekit_disk_t:s0 tcontext=system_u:system_r:devicekit_disk_t:s0 tclass=capability

type=SYSCALL msg=audit(1369319905.112:347): arch=x86_64 syscall=ioctl success=yes exit=0 a0=d a1=5401 a2=7fffa7b97330 a3=43 items=0 ppid=1 pid=1909 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=udisksd exe=/usr/lib/udisks2/udisksd subj=system_u:system_r:devicekit_disk_t:s0 key=(null)

Hash: udisksd,devicekit_disk_t,devicekit_disk_t,capability,sys_tty_config


#============= devicekit_disk_t ==============
allow devicekit_disk_t self:capability sys_tty_config;

audit2allow -R
require {
	type devicekit_disk_t;
	class capability sys_tty_config;

#============= devicekit_disk_t ==============
allow devicekit_disk_t self:capability sys_tty_config;

Additional info:
hashmarkername: setroubleshoot
kernel:         3.9.2-200.fc18.x86_64
type:           libreport
Comment 1 Daniel Walsh 2013-05-24 15:04:00 EDT
765b68190ec2214afce13508fc976b601732821a Fixes this in git.
Comment 2 Miroslav Grepl 2013-05-28 02:48:20 EDT
Back ported.
Comment 3 Fedora Update System 2013-05-28 14:58:12 EDT
selinux-policy-3.11.1-97.fc18 has been submitted as an update for Fedora 18.
Comment 4 Fedora Update System 2013-05-29 23:00:33 EDT
Package selinux-policy-3.11.1-97.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.11.1-97.fc18'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 5 Fedora Update System 2013-05-31 00:25:34 EDT
selinux-policy-3.11.1-97.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 6 Christian Groove 2013-06-10 16:32:39 EDT
Sorry, problem is still there:

Jun 10 22:18:12 suggs systemd-logind[658]: New session 8 of user root.
Jun 10 22:19:42 suggs udisksd[1501]: Error performing housekeeping for drive /org/freedesktop/UDisks2/drives/ST2000DL003_9VT166_5YD8KPYW: Error updating SMART data: sk_disk_check_sleep_mode: Operation not supported (udisks-error-quark, 0)

System freeze from time to time.

[root@suggs ~]# rpm -q -a | grep "selinux-poli"
Comment 7 Miroslav Grepl 2013-06-13 08:02:20 EDT
Are you getting AVC msgs?
Comment 8 Christian Groove 2013-06-13 08:21:03 EDT
Salut Miroslav,

i get no AVC message. The system sometimes freezes
like a DBUG Bus problem, that cause X11 to block.
Unfortunately i was not able to find any problem
in /var/log
Comment 9 Miroslav Grepl 2013-06-13 08:53:16 EDT
Probably you should open a new bug for udisks.

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