Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1543033 - SELinux is preventing memcached from starting
Summary: SELinux is preventing memcached from starting
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 27
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-07 15:30 UTC by Aurelien Bompard
Modified: 2018-06-04 14:43 UTC (History)
5 users (show)

Fixed In Version: selinux-policy-3.13.1-283.28.fc27
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-20 18:17:47 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Aurelien Bompard 2018-02-07 15:30:18 UTC
Description of problem:
On Fedora 27, starting memcached (installed from the RPM) causes an AVC on "{ map }" and the service fails to start.

Version-Release number of selected component (if applicable):
memcached-1.5.1-1.fc27.x86_64
selinux-policy-3.13.1-283.24.fc27.noarch

How reproducible:
always

Steps to Reproduce:
1. systemctl start memcached

Actual results:

# systemctl status memcached                                                                                                                                                                      
● memcached.service - memcached daemon              
   Loaded: loaded (/usr/lib/systemd/system/memcached.service; enabled; vendor preset: disabled)          
   Active: failed (Result: signal) since Wed 2018-02-07 15:12:32 UTC; 758ms ago                          
  Process: 1387 ExecStart=/usr/bin/memcached -p ${PORT} -u ${USER} -m ${CACHESIZE} -c ${MAXCONN} $OPTIONS (code=killed, signal=SEGV)                                                                               
 Main PID: 1387 (code=killed, signal=SEGV)


# tail -n 30 /var/log/audit/audit.log | grep memcached
type=SERVICE_START msg=audit(1518017171.214:70223): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=memcached comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
type=SELINUX_ERR msg=audit(1518017171.243:70224): op=security_bounded_transition seresult=denied oldcontext=system_u:system_r:init_t:s0 newcontext=system_u:system_r:memcached_t:s0
type=AVC msg=audit(1518017171.244:70225): avc:  denied  { map } for  pid=1628 comm="memcached" path="/usr/bin/memcached" dev="vda1" ino=147358 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:memcached_exec_t:s0 tclass=file permissive=0
type=ANOM_ABEND msg=audit(1518017171.244:70226): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=system_u:system_r:init_t:s0 pid=1628 comm="memcached" exe="/usr/bin/memcached" sig=11 res=1
type=SERVICE_STOP msg=audit(1518017171.250:70227): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=memcached comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'

# audit2why -i /tmp/audit.log 
type=AVC msg=audit(1517999955.666:69588): avc:  denied  { map } for  pid=30066 comm="memcached" path="/usr/bin/memcached" dev="vda1" ino=147358 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:memcached_exec_t:s0 tclass=file permissive=0

        Was caused by:
                Missing type enforcement (TE) allow rule.

                You can use audit2allow to generate a loadable module to allow this access.



Expected results:
memcached should start.

Comment 1 Fedora Update System 2018-03-12 18:13:28 UTC
selinux-policy-3.13.1-283.28.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-32ebae3424

Comment 2 Fedora Update System 2018-03-12 18:19:41 UTC
selinux-policy-3.13.1-283.28.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-32ebae3424

Comment 3 Fedora Update System 2018-03-14 01:36:14 UTC
selinux-policy-3.13.1-283.28.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-32ebae3424

Comment 4 Fedora Update System 2018-03-20 18:17:47 UTC
selinux-policy-3.13.1-283.28.fc27 has been pushed to the Fedora 27 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.