Bug 966611 - SELinux is preventing /usr/lib/udisks2/udisksd from using the 'sys_tty_config' capabilities.
Summary: SELinux is preventing /usr/lib/udisks2/udisksd from using the 'sys_tty_config...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 18
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:eb0d4d3492a0452d7d3cb2b4f4a...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-23 14:40 UTC by Moez Roy
Modified: 2013-06-13 12:53 UTC (History)
4 users (show)

Fixed In Version: selinux-policy-3.11.1-97.fc18
Clone Of:
Environment:
Last Closed: 2013-05-31 04:25:34 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Moez Roy 2013-05-23 14:40:19 UTC
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.
Do
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

audit2allow

#============= 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 19:04:00 UTC
765b68190ec2214afce13508fc976b601732821a Fixes this in git.

Comment 2 Miroslav Grepl 2013-05-28 06:48:20 UTC
Back ported.

Comment 3 Fedora Update System 2013-05-28 18:58:12 UTC
selinux-policy-3.11.1-97.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-97.fc18

Comment 4 Fedora Update System 2013-05-30 03:00:33 UTC
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:
https://admin.fedoraproject.org/updates/FEDORA-2013-9612/selinux-policy-3.11.1-97.fc18
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2013-05-31 04:25:34 UTC
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 GroovieMan 2013-06-10 20:32:39 UTC
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"
selinux-policy-3.11.1-97.fc18.noarch
selinux-policy-doc-3.11.1-97.fc18.noarch
selinux-policy-targeted-3.11.1-97.fc18.noarch
selinux-policy-devel-3.11.1-97.fc18.noarch

Comment 7 Miroslav Grepl 2013-06-13 12:02:20 UTC
Are you getting AVC msgs?

Comment 8 GroovieMan 2013-06-13 12:21:03 UTC
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 12:53:16 UTC
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.