Bug 1585358 - SELinux is preventing mpd from using the 'dac_override' capabilities.
Summary: SELinux is preventing mpd from using the 'dac_override' capabilities.
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 28
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
Whiteboard: abrt_hash:6be23e58446337257793cbd1efc...
Depends On:
TreeView+ depends on / blocked
Reported: 2018-06-02 01:00 UTC by Tim
Modified: 2018-07-29 03:22 UTC (History)
6 users (show)

Fixed In Version: selinux-policy-3.14.1-36.fc28
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-07-29 03:22:09 UTC
Type: ---

Attachments (Terms of Use)

Description Tim 2018-06-02 01:00:10 UTC
Description of problem:
Tried to start mpd service (sudo service mpd start)
SELinux is preventing mpd from using the 'dac_override' capabilities.

*****  Plugin dac_override (91.4 confidence) suggests   **********************

If you want to help identify if domain needs this access or you have a file with the wrong permissions on your system
Then turn on full auditing to get path information about the offending file and generate the error again.

Turn on full auditing
# auditctl -w /etc/shadow -p w
Try to recreate AVC. Then execute
# ausearch -m avc -ts recent
If you see PATH record check ownership/permissions on file, and fix it,
otherwise report as a bugzilla.

*****  Plugin catchall (9.59 confidence) suggests   **************************

If you believe that mpd should have the dac_override capability by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
allow this access for now by executing:
# ausearch -c 'mpd' --raw | audit2allow -M my-mpd
# semodule -X 300 -i my-mpd.pp

Additional Information:
Source Context                system_u:system_r:mpd_t:s0
Target Context                system_u:system_r:mpd_t:s0
Target Objects                Unknown [ capability ]
Source                        mpd
Source Path                   mpd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.1-30.fc28.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.16.12-300.fc28.x86_64 #1 SMP Fri
                              May 25 21:13:28 UTC 2018 x86_64 x86_64
Alert Count                   1
First Seen                    2018-06-01 20:56:03 EDT
Last Seen                     2018-06-01 20:56:03 EDT
Local ID                      5306a75c-d9bb-4b2d-9cfd-11704c911386

Raw Audit Messages
type=AVC msg=audit(1527900963.14:1330): avc:  denied  { dac_override } for  pid=6922 comm="mpd" capability=1  scontext=system_u:system_r:mpd_t:s0 tcontext=system_u:system_r:mpd_t:s0 tclass=capability permissive=0

Hash: mpd,mpd_t,mpd_t,capability,dac_override

Version-Release number of selected component:

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.5
hashmarkername: setroubleshoot
kernel:         4.16.12-300.fc28.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2018-06-02 22:40:16 UTC

Again same story with dac_override could you look on it? 


Comment 2 Milos Malik 2018-06-04 06:57:46 UTC
# sestatus 
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   enforcing
Mode from config file:          enforcing
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Memory protection checking:     actual (secure)
Max kernel policy version:      31
# ausearch -m avc -m user_avc -m selinux_err -m user_selinux_err -i -ts recent
type=PROCTITLE msg=audit(06/04/2018 08:53:29.736:233) : proctitle=/usr/bin/mpd --no-daemon 
type=PATH msg=audit(06/04/2018 08:53:29.736:233) : item=0 name=/var/log/mpd/ inode=9870514 dev=fc:02 mode=dir,755 ouid=mpd ogid=mpd rdev=00:00 obj=system_u:object_r:mpd_log_t:s0 nametype=PARENT cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 
type=CWD msg=audit(06/04/2018 08:53:29.736:233) : cwd=/ 
type=SYSCALL msg=audit(06/04/2018 08:53:29.736:233) : arch=x86_64 syscall=openat success=no exit=EACCES(Permission denied) a0=0xffffff9c a1=0x55738903acf0 a2=O_WRONLY|O_CREAT|O_NOCTTY|O_APPEND|O_CLOEXEC a3=0x1b6 items=1 ppid=1 pid=1717 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=mpd exe=/usr/bin/mpd subj=system_u:system_r:mpd_t:s0 key=(null) 
type=AVC msg=audit(06/04/2018 08:53:29.736:233) : avc:  denied  { dac_override } for  pid=1717 comm=mpd capability=dac_override  scontext=system_u:system_r:mpd_t:s0 tcontext=system_u:system_r:mpd_t:s0 tclass=capability permissive=0 
# ls -ild /var/log/mpd/
9870514 drwxr-xr-x. 2 mpd mpd 6 Mar  9 02:22 /var/log/mpd/
# ls -ali /var/log/mpd/
total 4
 9870514 drwxr-xr-x.  2 mpd  mpd     6 Mar  9 02:22 .
16797836 drwxr-xr-x. 10 root root 4096 Jun  4 08:52 ..

Comment 3 Fedora Update System 2018-07-25 22:27:39 UTC
selinux-policy-3.14.1-36.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-1050fb248b

Comment 4 Fedora Update System 2018-07-26 16:30:09 UTC
selinux-policy-3.14.1-36.fc28 has been pushed to the Fedora 28 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-1050fb248b

Comment 5 Fedora Update System 2018-07-29 03:22:09 UTC
selinux-policy-3.14.1-36.fc28 has been pushed to the Fedora 28 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.