Bug 1201813 - SELinux is preventing /usr/bin/python3.4 from search access on the directory dbus.
Summary: SELinux is preventing /usr/bin/python3.4 from search access on the directory ...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: Default_Local_DNS_Resolver
TreeView+ depends on / blocked
 
Reported: 2015-03-13 14:50 UTC by Tomáš Hozza
Modified: 2015-03-19 15:25 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-03-16 09:27:50 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hozza 2015-03-13 14:50:49 UTC
I updated dnssec-trigger script to use Python3 by default. After upgrade I got this AVC.

Note that dnssec-trigger script uses NetworkManager libnm Python bindings, which use DBus.


SELinux is preventing /usr/bin/python3.4 from search access on the directory dbus.

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

If you believe that python3.4 should be allowed search access on the dbus directory 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 dnssec-trigger- /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:dnssec_trigger_t:s0
Target Context                system_u:object_r:system_dbusd_var_run_t:s0
Target Objects                dbus [ dir ]
Source                        dnssec-trigger-
Source Path                   /usr/bin/python3.4
Port                          <Unknown>
Host                          thozza-pc
Source RPM Packages           python3-3.4.1-16.fc21.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-105.3.fc21.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     thozza-pc
Platform                      Linux thozza-pc 3.18.8-201.fc21.x86_64 #1 SMP Fri
                              Feb 27 18:18:27 UTC 2015 x86_64 x86_64
Alert Count                   2
First Seen                    2015-03-13 15:41:50 CET
Last Seen                     2015-03-13 15:42:00 CET
Local ID                      2b27da0b-f1b1-4bb5-81bf-b48c831fa183

Raw Audit Messages
type=AVC msg=audit(1426257720.555:1107): avc:  denied  { search } for  pid=17870 comm="dnssec-trigger-" name="dbus" dev="tmpfs" ino=14234 scontext=system_u:system_r:dnssec_trigger_t:s0 tcontext=system_u:object_r:system_dbusd_var_run_t:s0 tclass=dir permissive=0


type=SYSCALL msg=audit(1426257720.555:1107): arch=x86_64 syscall=connect success=no exit=EACCES a0=7 a1=7fff280c9510 a2=21 a3=0 items=0 ppid=17690 pid=17870 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=dnssec-trigger- exe=/usr/bin/python3.4 subj=system_u:system_r:dnssec_trigger_t:s0 key=(null)

Hash: dnssec-trigger-,dnssec_trigger_t,system_dbusd_var_run_t,dir,search

Comment 1 Lukas Vrabec 2015-03-16 09:27:50 UTC
#============= dnssec_trigger_t ==============

#!!!! This avc is allowed in the current policy
allow dnssec_trigger_t system_dbusd_var_run_t:dir search;


$ rpm -q selinux-policy
selinux-policy-3.13.1-105.6.fc21.noarch


Please update selinux-policy package.
https://admin.fedoraproject.org/updates/FEDORA-2015-3476/selinux-policy-3.13.1-105.6.fc21?_csrf_token=16f45799f4c5a4f83bdb778597eef39ea1b2c44d


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