Bug 1210250
| Summary: | SELinux is preventing /usr/sbin/dnssec-triggerd from write access on the directory /etc. | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Tomáš Hozza <thozza> |
| Component: | selinux-policy | Assignee: | Lukas Vrabec <lvrabec> |
| Status: | CLOSED WORKSFORME | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 22 | CC: | cra, dominick.grift, dominik, dwalsh, lso, lvrabec, mgrepl, plautrba, thozza |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | selinux-policy-3.13.1-122.fc22 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-07-20 08:11:16 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: | |||
| Bug Blocks: | 1164044, 1182488 | ||
Tomas, could you collect AVC msgs also from permissive mode? commit 06005bc0ac9370f93ba99e44d478e9930f3896c1
Author: Lukas Vrabec <lvrabec>
Date: Thu Apr 9 21:06:09 2015 +0200
Allow dnssec_trigger_t to stream connect to networkmanager.
commit 2c3a0d6d02474851e2ffd711ae8fd5176003624e
Author: Lukas Vrabec <lvrabec>
Date: Thu Apr 9 19:35:47 2015 +0200
Allow dnssec_trigger_t to create resolv files labeled as net_conf_t
commit cfb2997e16f7106c916c903d4aac2aa9102ba7bf
Author: Lukas Vrabec <lvrabec>
Date: Thu Apr 9 17:57:43 2015 +0200
Label new dnssec-trigger files.
Tomas,
There is one more AVC.
type=AVC msg=audit(1428608873.655:903): avc: denied { read } for pid=31681 comm="dnssec-trigger-" name="/" dev="tmpfs" ino=14649 scontext=system_u:system_r:dnssec_trigger_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=dir permissive=1
Could I dontaudit this?
Thank you.
It comes from dnsseec-trigger-script
..
..
..
stat("/etc/utmp", 0x7ffd9f0e07e0) = -1 ENOENT (No such file or directory)
stat("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=600, ...}) = 0
open("/tmp", O_RDONLY) = 7
read(7, 0x7ffd9f0e0870, 8192) = -1 EISDIR (Is a directory)
close(7) = 0
stat("/var/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0
open("/var/tmp", O_RDONLY) = 7
read(7, 0x7ffd9f0e0870, 8192) = -1 EISDIR (Is a directory)
close(7) = 0
stat("/usr/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0
open("/usr/tmp", O_RDONLY)
(In reply to Lukas Vrabec from comment #3) > Tomas, > There is one more AVC. > type=AVC msg=audit(1428608873.655:903): avc: denied { read } for > pid=31681 comm="dnssec-trigger-" name="/" dev="tmpfs" ino=14649 > scontext=system_u:system_r:dnssec_trigger_t:s0 > tcontext=system_u:object_r:tmp_t:s0 tclass=dir permissive=1 > > Could I dontaudit this? > > Thank you. I think it is not needed. With the recent changes in dnssec-trigger-script and with selinux-policy-3.13.1-128.4.fc22.noarch I'm not seeing any issues related to this. Can we then take this bug as fixed and close it? *** Bug 1200996 has been marked as a duplicate of this bug. *** *** Bug 1215376 has been marked as a duplicate of this bug. *** yes. Closing for now. |
Description of problem: SELinux is preventing /usr/sbin/dnssec-triggerd from write access on the directory /etc. ***** Plugin catchall_labels (83.8 confidence) suggests ******************* If you want to allow dnssec-triggerd to have write access on the etc directory Then you need to change the label on /etc Do # semanage fcontext -a -t FILE_TYPE '/etc' where FILE_TYPE is one of the following: dnssec_trigger_var_run_t, net_conf_t, var_run_t. Then execute: restorecon -v '/etc' ***** Plugin catchall (17.1 confidence) suggests ************************** If you believe that dnssec-triggerd should be allowed write access on the etc directory by default. Then you should report this as a bug. You can generate a local policy module to allow this access. Do allow this access for now by executing: # grep dnssec-triggerd /var/log/audit/audit.log | audit2allow -M mypol # semodule -i mypol.pp Additional Information: Source Context system_u:system_r:dnssec_trigger_t:s0 Target Context system_u:object_r:etc_t:s0 Target Objects /etc [ dir ] Source dnssec-triggerd Source Path /usr/sbin/dnssec-triggerd Port <Unknown> Host thozza-pc Source RPM Packages dnssec-trigger-0.12-19.fc21.x86_64 Target RPM Packages filesystem-3.2-28.fc21.x86_64 Policy RPM selinux-policy-3.13.1-105.9.fc21.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name thozza-pc Platform Linux thozza-pc 3.19.3-200.fc21.x86_64 #1 SMP Thu Mar 26 21:39:42 UTC 2015 x86_64 x86_64 Alert Count 165 First Seen 2015-02-16 08:57:01 CET Last Seen 2015-04-09 08:51:44 CEST Local ID 5f809d20-9dc6-4edc-81f3-6199f4afba16 Raw Audit Messages type=AVC msg=audit(1428562304.184:412): avc: denied { write } for pid=1363 comm="dnssec-triggerd" name="etc" dev="dm-0" ino=3145729 scontext=system_u:system_r:dnssec_trigger_t:s0 tcontext=system_u:object_r:etc_t:s0 tclass=dir permissive=0 type=SYSCALL msg=audit(1428562304.184:412): arch=x86_64 syscall=open success=no exit=EACCES a0=7fadc6fc2480 a1=241 a2=1b6 a3=241 items=0 ppid=1 pid=1363 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=dnssec-triggerd exe=/usr/sbin/dnssec-triggerd subj=system_u:system_r:dnssec_trigger_t:s0 key=(null) Hash: dnssec-triggerd,dnssec_trigger_t,etc_t,dir,write Version-Release number of selected component (if applicable): selinux-policy-3.13.1-105.9.fc21.noarch How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: My system ends up without /etc/resolv.conf because dnssec-triggerd is not able to write it into /etc. libvirt dnsmasq instance is not able to provide DNS service to VMs as a consequence of this issue. Expected results: SELinux should finally allow dnssec-trigger to write /etc/resolv.conf!!! Additional info: