Bug 684420 - SELinux is preventing /bin/systemd-tmpfiles from 'getattr' accesses on the blk_file /tmp/initrd.yvQczh/dev/ram1.
Summary: SELinux is preventing /bin/systemd-tmpfiles from 'getattr' accesses on the bl...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 15
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:eaf6e0cdcc7...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-12 12:39 UTC by Jeff Layton
Modified: 2014-06-18 07:41 UTC (History)
3 users (show)

Fixed In Version: selinux-policy-3.9.16-5.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-03-19 05:54:04 UTC


Attachments (Terms of Use)

Description Jeff Layton 2011-03-12 12:39:03 UTC
SELinux is preventing /bin/systemd-tmpfiles from 'getattr' accesses on the blk_file /tmp/initrd.yvQczh/dev/ram1.

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

If you believe that systemd-tmpfiles should be allowed getattr access on the ram1 blk_file 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 systemd-tmpfile /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:systemd_tmpfiles_t:s0
Target Context                unconfined_u:object_r:initrc_tmp_t:s0
Target Objects                /tmp/initrd.yvQczh/dev/ram1 [ blk_file ]
Source                        systemd-tmpfile
Source Path                   /bin/systemd-tmpfiles
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           systemd-units-20-1.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-1.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.38-0.rc8.git0.1.fc15.x86_64 #1 SMP Tue Mar 8
                              08:22:15 UTC 2011 x86_64 x86_64
Alert Count                   2
First Seen                    Thu 10 Mar 2011 10:52:27 AM EST
Last Seen                     Sat 12 Mar 2011 07:37:33 AM EST
Local ID                      1ac4e5d3-25ae-4817-ab09-563445f5add2

Raw Audit Messages
type=AVC msg=audit(1299933453.589:89): avc:  denied  { getattr } for  pid=3198 comm="systemd-tmpfile" path="/tmp/initrd.yvQczh/dev/ram1" dev=sda3 ino=4720542 scontext=system_u:system_r:systemd_tmpfiles_t:s0 tcontext=unconfined_u:object_r:initrc_tmp_t:s0 tclass=blk_file


type=SYSCALL msg=audit(1299933453.589:89): arch=x86_64 syscall=newfstatat success=yes exit=0 a0=7 a1=18fd583 a2=7fffe27c3ab0 a3=100 items=0 ppid=1 pid=3198 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=systemd-tmpfile exe=/bin/systemd-tmpfiles subj=system_u:system_r:systemd_tmpfiles_t:s0 key=(null)

Hash: systemd-tmpfile,systemd_tmpfiles_t,initrc_tmp_t,blk_file,getattr

audit2allow

#============= systemd_tmpfiles_t ==============
allow systemd_tmpfiles_t initrc_tmp_t:blk_file getattr;

audit2allow -R

#============= systemd_tmpfiles_t ==============
allow systemd_tmpfiles_t initrc_tmp_t:blk_file getattr;

Comment 1 Miroslav Grepl 2011-03-14 09:19:44 UTC
Well, this is a problem with systemd-tmpfile and /tmp directory and making things like this. We already have

files_getattr_all_dirs(systemd_tmpfiles_t)
files_getattr_all_files(systemd_tmpfiles_t)

and I think we will need to allow it.

Comment 2 Daniel Walsh 2011-03-14 18:58:35 UTC
Added

	delete_chr_files_pattern($1, tmpfile, tmpfile)
	delete_blk_files_pattern($1, tmpfile, tmpfile)

To files_purge_tmp

Fixed in selinux-policy-3.9.16-4.fc15

Comment 3 Fedora Update System 2011-03-17 15:28:56 UTC
selinux-policy-3.9.16-5.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-5.fc15

Comment 4 Fedora Update System 2011-03-19 05:53:08 UTC
selinux-policy-3.9.16-5.fc15 has been pushed to the Fedora 15 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.