Bug 918089
Summary: | SELinux is preventing /usr/sbin/opendkim from using the dac_override capability | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Miroslav Grepl <mgrepl> |
Component: | dkim-milter | Assignee: | Jim Radford <radford> |
Status: | CLOSED DUPLICATE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 17 | CC: | amessina, awilliam, dominick.grift, dwalsh, mgrepl, radford, vg.aetera |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | 891292 | Environment: | |
Last Closed: | 2013-08-01 09:16:38 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 891292 | ||
Bug Blocks: |
Description
Miroslav Grepl
2013-03-05 13:09:27 UTC
I can confirm the following with selinux-policy-targeted-3.11.1-86.fc18.noarch, and opendkim-2.7.4-1.fc18.x86_64 I get the error in permissive mode when opendkim is trying to access /etc/opendkim/TrustedHosts. [root@host opendkim]# ls -alZ /etc/opendkim drwxr-xr-x. root opendkim system_u:object_r:etc_t:s0 . drwxr-xr-x. root root system_u:object_r:etc_t:s0 .. drwxr-x---. root opendkim system_u:object_r:etc_t:s0 keys -rw-r-----. opendkim opendkim system_u:object_r:etc_t:s0 KeyTable -rw-r-----. opendkim opendkim system_u:object_r:etc_t:s0 SigningTable -rw-r-----. opendkim opendkim system_u:object_r:etc_t:s0 TrustedHosts time->Wed Apr 3 04:05:33 2013 type=PATH msg=audit(1364979933.237:200): item=0 name="/etc/opendkim/TrustedHosts" inode=58312857 dev=09:01 mode=0100640 ouid=989 ogid=987 rdev=00:00 obj=system_u:object_r:etc_t:s0 type=CWD msg=audit(1364979933.237:200): cwd="/" type=SYSCALL msg=audit(1364979933.237:200): arch=c000003e syscall=2 success=yes exit=3 a0=17b8da7 a1=0 a2=1b6 a3=238 items=1 ppid=3772 pid=3773 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm="opendkim" exe="/usr/sbin/opendkim" subj=system_u:system_r:dkim_milter_t:s0 key=(null) type=AVC msg=audit(1364979933.237:200): avc: denied { dac_override } for pid=3773 comm="opendkim" capability=1 scontext=system_u:system_r:dkim_milter_t:s0 tcontext=system_u:system_r:dkim_milter_t:s0 tclass=capability ---- time->Wed Apr 3 04:05:33 2013 type=PATH msg=audit(1364979933.619:202): item=0 name="/var/lib/sepolgen/interface_info" inode=108740707 dev=09:01 mode=0100644 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:var_lib_t:s0 type=CWD msg=audit(1364979933.619:202): cwd="/" type=SYSCALL msg=audit(1364979933.619:202): arch=c000003e syscall=2 success=yes exit=3 a0=22d2440 a1=0 a2=1b6 a3=238 items=1 ppid=612 pid=3788 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm="audit2allow" exe="/usr/bin/python2.7" subj=system_u:system_r:setroubleshootd_t:s0-s0:c0.c1023 key=(null) type=AVC msg=audit(1364979933.619:202): avc: denied { open } for pid=3788 comm="audit2allow" path="/var/lib/sepolgen/interface_info" dev="md1" ino=108740707 scontext=system_u:system_r:setroubleshootd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_lib_t:s0 tclass=file type=AVC msg=audit(1364979933.619:202): avc: denied { read } for pid=3788 comm="audit2allow" name="interface_info" dev="md1" ino=108740707 scontext=system_u:system_r:setroubleshootd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_lib_t:s0 tclass=file Yes, the problem is with permissions on /etc/opendkim/TrustedHosts. (In reply to comment #2) > Yes, the problem is with permissions on /etc/opendkim/TrustedHosts. What permissions should it have, then? My opendkim service runs as the opendkim user. I see from AVC that it runs as root type=SYSCALL msg=audit(1364979933.237:200): arch=c000003e syscall=2 success=yes exit=3 a0=17b8da7 a1=0 a2=1b6 a3=238 items=1 ppid=3772 pid=3773 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm="opendkim" exe="/usr/sbin/opendkim" subj=system_u:system_r:dkim_milter_t:s0 key=(null) Ok, but it must drop privs or something: ~]# ps aufx|grep opendkim root 6637 0.0 0.0 109180 924 pts/2 S+ 07:39 0:00 | \_ grep --color=auto opendkim opendkim 3774 0.0 0.0 50420 1000 ? Ss 04:05 0:00 /usr/sbin/opendkim -x /etc/opendkim.conf -P /var/run/opendkim/opendkim.pid opendkim 3775 0.0 0.0 214408 2924 ? Sl 04:05 0:00 \_ /usr/sbin/opendkim -x /etc/opendkim.conf -P /var/run/opendkim/opendkim.pid ~]# id opendkim uid=989(opendkim) gid=987(opendkim) groups=987(opendkim),12(mail) Should I change the owner to root to avoid the dac_override issue? The problem here is dkim_milder_t running as root (uid=0) is not allowed access. So the access is probably happening before you setuid. (In reply to comment #6) > The problem here is dkim_milder_t running as root (uid=0) is not allowed > access. > > So the access is probably happening before you setuid. Does that mean that this bug should be filed against opendkim instead? I'd be happy to move it over there if that's the case. I see that this bug is opened for Component: dkim-milter (In reply to comment #8) > I see that this bug is opened for > > Component: > dkim-milter Oops! I forgot you cloned it already. My coffee maker broke this morning :( Thanks again. No problem. This message is a reminder that Fedora 17 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 17. 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 WONTFIX if it remains open with a Fedora 'version' of '17'. 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 prior to Fedora 17's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 17 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 to Fedora 17's end of life. 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. Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 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. Thank you for reporting this bug and we are sorry it could not be fixed. *** This bug has been marked as a duplicate of bug 891292 *** |