Bug 1256008 - SELinux is preventing dhclient-script from 'getattr' accesses on the file /usr/libexec/chrony-helper.
Summary: SELinux is preventing dhclient-script from 'getattr' accesses on the file /us...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 22
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:e538aef434a1fc7e27a4f311f52...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-23 07:43 UTC by Francesco Frassinelli (frafra)
Modified: 2015-09-18 11:27 UTC (History)
9 users (show)

Fixed In Version: 3.13.1-128.13.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-09-16 21:20:34 UTC


Attachments (Terms of Use)

Description Francesco Frassinelli (frafra) 2015-08-23 07:43:36 UTC
Description of problem:
SELinux is preventing dhclient-script from 'getattr' accesses on the file /usr/libexec/chrony-helper.

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

If si crede che dhclient-script dovrebbe avere possibilità di accesso getattr sui chrony-helper file in modo predefinito.
Then si dovrebbe riportare il problema come bug.
E' possibile generare un modulo di politica locale per consentire questo accesso.
Do
consentire questo accesso per il momento eseguendo:
# grep dhclient-script /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:dhcpc_t:s0
Target Context                system_u:object_r:chronyd_exec_t:s0
Target Objects                /usr/libexec/chrony-helper [ file ]
Source                        dhclient-script
Source Path                   dhclient-script
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           chrony-2.1.1-1.fc22.x86_64
Policy RPM                    selinux-policy-3.13.1-128.10.fc22.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.2.0-0.rc5.git2.1.fc24.x86_64 #1
                              SMP Wed Aug 5 15:05:13 UTC 2015 x86_64 x86_64
Alert Count                   4
First Seen                    2015-08-22 18:06:11 CEST
Last Seen                     2015-08-23 09:41:12 CEST
Local ID                      d17a779d-b88b-43cf-94bc-9e46a22970f1

Raw Audit Messages
type=AVC msg=audit(1440315672.691:542): avc:  denied  { getattr } for  pid=2233 comm="dhclient-script" path="/usr/libexec/chrony-helper" dev="dm-1" ino=350677 scontext=system_u:system_r:dhcpc_t:s0 tcontext=system_u:object_r:chronyd_exec_t:s0 tclass=file permissive=0


Hash: dhclient-script,dhcpc_t,chronyd_exec_t,file,getattr

Version-Release number of selected component:
selinux-policy-3.13.1-128.10.fc22.noarch

Additional info:
reporter:       libreport-2.6.2
hashmarkername: setroubleshoot
kernel:         4.2.0-0.rc5.git2.1.fc24.x86_64
type:           libreport

Comment 1 Neil 2015-08-25 20:55:33 UTC
Description of problem:
running "$ dhclient eno1"

dhclient eno1 
/etc/dhcp/dhclient.d/chrony.sh: línea 11: /usr/libexec/chrony-helper: Permiso denegado

Version-Release number of selected component:
selinux-policy-3.13.1-128.10.fc22.noarch

Additional info:
reporter:       libreport-2.6.2
hashmarkername: setroubleshoot
kernel:         4.1.5-200.fc22.x86_64
type:           libreport

Comment 2 Lukas Vrabec 2015-08-26 11:10:04 UTC
Hi, 
Could you reproduce it in permissive mode? (#setenforce 0)

Comment 3 Neil 2015-08-26 19:35:59 UTC
Nope, dhclient didn't output any error. 

Instead had this on AVC

SELinux is preventing chrony-helper from ioctl access on the file /usr/libexec/chrony-helper.

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

If cree que de manera predeterminada, chrony-helper debería permitir acceso ioctl sobre  chrony-helper file.     
Then debería reportar esto como un error.
Puede generar un módulo de política local para permitir este acceso.
Do
permita el acceso momentáneamente executando:
# grep chrony-helper /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:system_r:dhcpc_t:s0-s0:c0.c1023
Target Context                system_u:object_r:chronyd_exec_t:s0
Target Objects                /usr/libexec/chrony-helper [ file ]
Source                        chrony-helper
Source Path                   chrony-helper
Port                          <Unknown>
Host                          infinity
Source RPM Packages           
Target RPM Packages           chrony-2.1.1-1.fc22.x86_64
Policy RPM                    selinux-policy-3.13.1-128.10.fc22.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     infinity
Platform                      Linux infinity 4.1.5-200.fc22.x86_64 #1 SMP Mon
                              Aug 10 23:38:23 UTC 2015 x86_64 x86_64
Alert Count                   1
First Seen                    2015-08-26 14:34:07 COT
Last Seen                     2015-08-26 14:34:07 COT
Local ID                      b18e7703-c8f2-48e0-85da-a49508c12a23

Raw Audit Messages
type=AVC msg=audit(1440617647.644:178): avc:  denied  { ioctl } for  pid=1783 comm="chrony-helper" path="/usr/libexec/chrony-helper" dev="sda7" ino=791368 scontext=unconfined_u:system_r:dhcpc_t:s0-s0:c0.c1023 tcontext=system_u:object_r:chronyd_exec_t:s0 tclass=file permissive=1


Hash: chrony-helper,dhcpc_t,chronyd_exec_t,file,ioctl

Comment 4 Lukas Vrabec 2015-08-27 12:25:17 UTC
commit 85dbf965f1001b836249240fffbde332012bc776
Author: Lukas Vrabec <lvrabec@redhat.com>
Date:   Thu Aug 27 11:17:52 2015 +0200

    Allow dhcpc_t domain transition to chronyd_t

Comment 5 Arnaud 2015-09-02 18:08:39 UTC
Description of problem:
Switched my network connection to systemd-networkd, and it happens since that with many logs:
dhclient[1149]: send_packet: Operation not permitted
dhclient[1149]: dhclient.c:2677: Failed to send 300 byte long packet over fallback interface.

It doesn't seem to happen when I use NetworkManager


Version-Release number of selected component:
selinux-policy-3.13.1-128.12.fc22.noarch

Additional info:
reporter:       libreport-2.6.2
hashmarkername: setroubleshoot
kernel:         4.1.6-200.fc22.x86_64
type:           libreport

Comment 6 Fedora Update System 2015-09-14 10:00:05 UTC
selinux-policy-3.13.1-128.13.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-15798

Comment 7 Fedora Update System 2015-09-15 05:55:40 UTC
selinux-policy-3.13.1-128.13.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update selinux-policy'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-15798

Comment 8 Fedora Update System 2015-09-16 21:20:22 UTC
selinux-policy-3.13.1-128.13.fc22 has been pushed to the Fedora 22 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.