Bug 995878

Summary: SELinux is preventing /usr/bin/perl from 'unlink' accesses on the file zm.mmap.1.
Product: [Fedora] Fedora Reporter: Allen <AllenEmailID>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: AllenEmailID, dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:7ec92c492fbc57f13406c49639d7eefd131a31d29f1627db62e0c12cba4982d0
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-10-24 17:56:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
list of zoneminder avc logs none

Description Allen 2013-08-11 18:36:52 UTC
Description of problem:
Updated libraries
SELinux is preventing /usr/bin/perl from 'unlink' accesses on the file zm.mmap.1.

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

If you believe that perl should be allowed unlink access on the zm.mmap.1 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 zmpkg.pl /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:zoneminder_t:s0
Target Context                unconfined_u:object_r:user_tmpfs_t:s0
Target Objects                zm.mmap.1 [ file ]
Source                        zmpkg.pl
Source Path                   /usr/bin/perl
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           perl-5.16.3-265.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-69.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.10.4-300.fc19.x86_64 #1 SMP Tue
                              Jul 30 11:29:05 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-08-11 08:37:39 PDT
Last Seen                     2013-08-11 08:37:39 PDT
Local ID                      3988d192-2b1d-4f80-bccd-afa907cb119c

Raw Audit Messages
type=AVC msg=audit(1376235459.753:42887): avc:  denied  { unlink } for  pid=19794 comm="zmpkg.pl" name="zm.mmap.1" dev="tmpfs" ino=30129005 scontext=system_u:system_r:zoneminder_t:s0 tcontext=unconfined_u:object_r:user_tmpfs_t:s0 tclass=file


type=SYSCALL msg=audit(1376235459.753:42887): arch=x86_64 syscall=unlink success=yes exit=0 a0=2088d00 a1=26 a2=1 a3=118 items=0 ppid=1 pid=19794 auid=4294967295 uid=48 gid=486 euid=48 suid=48 fsuid=48 egid=486 sgid=486 fsgid=486 ses=4294967295 tty=(none) comm=zmpkg.pl exe=/usr/bin/perl subj=system_u:system_r:zoneminder_t:s0 key=(null)

Hash: zmpkg.pl,zoneminder_t,user_tmpfs_t,file,unlink

Additional info:
reporter:       libreport-2.1.6
hashmarkername: setroubleshoot
kernel:         3.10.5-201.fc19.x86_64
type:           libreport

Comment 1 Allen 2013-08-11 18:45:21 UTC
Description of problem:
Updated libs

Additional info:
reporter:       libreport-2.1.6
hashmarkername: setroubleshoot
kernel:         3.10.5-201.fc19.x86_64
type:           libreport

Comment 2 Daniel Walsh 2013-08-15 18:16:40 UTC
Why is zoneminder looking at user content in a tmpfs?  Where is zm.mmap.1 located?

Comment 3 Miroslav Grepl 2013-08-19 15:45:27 UTC
What were you doing when this happened?

Comment 4 Allen 2013-08-19 22:16:43 UTC
Trying to start zoneminder after the latest (as of the day before) Fedora patches had been applied.
---
ZoneMinder creates temporary files under and uses  /dev/shm/.

Comment 6 Lukas Vrabec 2013-08-21 09:58:22 UTC
Created attachment 788782 [details]
list of zoneminder avc logs

Hi Allen, 

Could you compare my AVC list with your logs, see the same AVC logs or you just got the problem with that you post above?

Comment 7 Allen 2016-06-06 23:20:18 UTC
Closed in 2013 and yet I am still getting nag emails about this.
This was opened with two associated tickets one of which was quickly marked as "Won't Fix" which made this and the other one useless.