Bug 1418902 - SELinux prevents puppetmaster from starting
Summary: SELinux prevents puppetmaster from starting
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted
Version: 26
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-03 04:50 UTC by Tim Landscheidt
Modified: 2018-05-29 11:19 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-29 11:19:45 UTC
Type: Bug


Attachments (Terms of Use)

Description Tim Landscheidt 2017-02-03 04:50:17 UTC
(This bug is probably a twin of bug 1376893.)


Description of problem:

SELinux prevents puppetmaster from starting.


Version-Release number of selected component (if applicable):

puppet-4.2.1-3.fc24.noarch
puppet-server-4.2.1-3.fc24.noarch
selinux-policy-targeted-3.13.1-224.fc25.noarch


How reproducible:

Always.


Steps to Reproduce:
1. dnf install puppet puppet-server
2. systemctl start puppetmaster


Actual results:

(Note: Second alert may be due to the first one.)

| SELinux is preventing start-puppet-ma from execute access on the file puppet.

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

| If sie denken, dass es start-puppet-ma standardmäßig erlaubt sein sollte, execute Zugriff auf puppet file zu erhalten.
| Then sie sollten dies als Fehler melden.
| Um diesen Zugriff zu erlauben, können Sie ein lokales Richtlinien-Modul erstellen.
| Do
| allow this access for now by executing:
| # ausearch -c 'start-puppet-ma' --raw | audit2allow -M my-startpuppetma
| # semodule -X 300 -i my-startpuppetma.pp

| Additional Information:
| Source Context                system_u:system_r:puppetmaster_t:s0
| Target Context                system_u:object_r:puppetagent_exec_t:s0
| Target Objects                puppet [ file ]
| Source                        start-puppet-ma
| Source Path                   start-puppet-ma
| Port                          <Unknown>
| Host                          localhost.localdomain
| Source RPM Packages           
| Target RPM Packages           
| Policy RPM                    selinux-policy-3.13.1-224.fc25.noarch
| Selinux Enabled               True
| Policy Type                   targeted
| Enforcing Mode                Enforcing
| Host Name                     localhost.localdomain
| Platform                      Linux localhost.localdomain 4.8.6-300.fc25.i686 #1
|                               SMP Tue Nov 1 13:10:55 UTC 2016 i686 i686
| Alert Count                   1
| First Seen                    2017-02-03 05:41:16 CET
| Last Seen                     2017-02-03 05:41:16 CET
| Local ID                      fb9a454e-3e21-4f61-943e-175f9faa087f

| Raw Audit Messages
| type=AVC msg=audit(1486096876.102:233): avc:  denied  { execute } for  pid=2681 comm="start-puppet-ma" name="puppet" dev="dm-0" ino=449119 scontext=system_u:system_r:puppetmaster_t:s0 tcontext=system_u:object_r:puppetagent_exec_t:s0 tclass=file permissive=0


| Hash: start-puppet-ma,puppetmaster_t,puppetagent_exec_t,file,execute



| SELinux is preventing start-puppet-ma from getattr access on the file /usr/bin/puppet.

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

| If sie denken, dass es start-puppet-ma standardmäßig erlaubt sein sollte, getattr Zugriff auf puppet file zu erhalten.
| Then sie sollten dies als Fehler melden.
| Um diesen Zugriff zu erlauben, können Sie ein lokales Richtlinien-Modul erstellen.
| Do
| allow this access for now by executing:
| # ausearch -c 'start-puppet-ma' --raw | audit2allow -M my-startpuppetma
| # semodule -X 300 -i my-startpuppetma.pp

| Additional Information:
| Source Context                system_u:system_r:puppetmaster_t:s0
| Target Context                system_u:object_r:puppetagent_exec_t:s0
| Target Objects                /usr/bin/puppet [ file ]
| Source                        start-puppet-ma
| Source Path                   start-puppet-ma
| Port                          <Unknown>
| Host                          localhost.localdomain
| Source RPM Packages           
| Target RPM Packages           puppet-4.2.1-3.fc24.noarch
| Policy RPM                    selinux-policy-3.13.1-224.fc25.noarch
| Selinux Enabled               True
| Policy Type                   targeted
| Enforcing Mode                Enforcing
| Host Name                     localhost.localdomain
| Platform                      Linux localhost.localdomain 4.8.6-300.fc25.i686 #1
|                               SMP Tue Nov 1 13:10:55 UTC 2016 i686 i686
| Alert Count                   3
| First Seen                    2017-02-03 05:41:16 CET
| Last Seen                     2017-02-03 05:41:16 CET
| Local ID                      bb8e0700-a347-4c78-9a1f-f663de96c4c3

| Raw Audit Messages
| type=AVC msg=audit(1486096876.126:236): avc:  denied  { getattr } for  pid=2681 comm="start-puppet-ma" path="/usr/bin/puppet" dev="dm-0" ino=449119 scontext=system_u:system_r:puppetmaster_t:s0 tcontext=system_u:object_r:puppetagent_exec_t:s0 tclass=file permissive=0


| Hash: start-puppet-ma,puppetmaster_t,puppetagent_exec_t,file,getattr

Comment 1 Frank Ansari 2017-02-25 17:42:54 UTC
This was really annoying. I have to run three times until I finally got all necessary stuff into the policy that puppetmaster was able to start.

This is the result:

module my-puppetmaster 1.0;

require {
	type puppetmaster_t;
	type puppetagent_exec_t;
	class file { execute execute_no_trans getattr open read };
}

#============= puppetmaster_t ==============
allow puppetmaster_t puppetagent_exec_t:file execute_no_trans;

#!!!! This avc is allowed in the current policy
allow puppetmaster_t puppetagent_exec_t:file { execute getattr open read };

Comment 2 Frank Ansari 2017-08-12 15:07:03 UTC
Why is this not fixed? I have the same issue with Fedora 26.

Comment 3 Fedora End Of Life 2017-11-16 18:44:55 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 4 Fedora End Of Life 2018-05-03 08:05:16 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '26'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 5 Fedora End Of Life 2018-05-29 11:19:45 UTC
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26
is no longer maintained, which means that it will not receive any
further security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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