Bug 581257 - SELinux is preventing /usr/bin/perl "getattr" access on /usr/bin/lpstat.cups.
Summary: SELinux is preventing /usr/bin/perl "getattr" access on /usr/bin/lpstat....
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 12
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:8932e46abf3...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-04-11 12:57 UTC by Gabriele Pohl
Modified: 2010-05-03 16:08 UTC (History)
2 users (show)

Fixed In Version: selinux-policy-3.6.32-113.fc12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-05-03 16:08:49 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Gabriele Pohl 2010-04-11 12:57:12 UTC
Summary:

SELinux is preventing /usr/bin/perl "getattr" access on /usr/bin/lpstat.cups.

Detailed Description:

SELinux denied access requested by lpstat. It is not expected that this access
is required by lpstat and this access may signal an intrusion attempt. It is
also possible that the specific version or configuration of the application is
causing it to require additional access.

Allowing Access:

You can generate a local policy module to allow this access - see FAQ
(http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385) Please file a bug
report.

Additional Information:

Source Context                system_u:system_r:munin_t:s0
Target Context                system_u:object_r:lpr_exec_t:s0
Target Objects                /usr/bin/lpstat.cups [ file ]
Source                        lpstat
Source Path                   /usr/bin/perl
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           perl-5.10.0-87.fc12
Target RPM Packages           cups-1.4.2-28.fc12
Policy RPM                    selinux-policy-3.6.32-108.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed) 2.6.32.10-90.fc12.i686 #1 SMP Tue Mar
                              23 10:21:29 UTC 2010 i686 i686
Alert Count                   952
First Seen                    Sat 10 Apr 2010 10:05:10 AM CEST
Last Seen                     Sun 11 Apr 2010 02:45:05 PM CEST
Local ID                      ccb0cdfa-f366-43d0-957a-9d983432a81d
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1270989905.763:27346): avc:  denied  { getattr } for  pid=5957 comm="lpstat" path="/usr/bin/lpstat.cups" dev=dm-1 ino=28143 scontext=system_u:system_r:munin_t:s0 tcontext=system_u:object_r:lpr_exec_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1270989905.763:27346): arch=40000003 syscall=195 success=no exit=-13 a0=8adb57c a1=8a9c0c0 a2=417ff4 a3=8a9c008 items=0 ppid=5717 pid=5957 auid=4294967295 uid=491 gid=478 euid=491 suid=491 fsuid=491 egid=478 sgid=478 fsgid=478 tty=(none) ses=4294967295 comm="lpstat" exe="/usr/bin/perl" subj=system_u:system_r:munin_t:s0 key=(null)


The error is produced by munin-node plugin "lpstat",
which is delivered with the munin-node package:

rpm -qi munin-node
Name        : munin-node                   Relocations: (not relocatable)
Version     : 1.4.4                             Vendor: Fedora Project
Release     : 1.fc12                        Build Date: Tue 02 Mar 2010 03:04:33 AM CET
Install Date: Wed 07 Apr 2010 09:55:49 PM CEST      Build Host: ppc02.phx2.fedoraproject.org
Group       : System Environment/Daemons    Source RPM: munin-1.4.4-1.fc12.src.rpm
Size        : 1264298                          License: GPLv2 and Bitstream Vera
Signature   : RSA/8, Tue 02 Mar 2010 03:52:57 AM CET, Key ID 9d1cc34857bbccba
Packager    : Fedora Project

Hash String generated from  catchall,lpstat,munin_t,lpr_exec_t,file,getattr
audit2allow suggests:

#============= munin_t ==============
allow munin_t lpr_exec_t:file getattr;

Comment 1 Miroslav Grepl 2010-04-12 10:37:56 UTC
We have a policy for munin plugins in F13 that allows it. I will backport this policy to F12.

You can add a custom local module for now

# cat > mymunin.te << _EOF
policy_module(mymunin, 1.0)

require {
         type munin_t;
}

lpd_exec_lpr(munin_t)
_EOF

# make -f /usr/share/selinux/devel/Makefile
# semodule -i mymunin.pp

Comment 2 Carl G. 2010-04-12 13:47:11 UTC
*** Bug 581265 has been marked as a duplicate of this bug. ***

Comment 3 Miroslav Grepl 2010-04-13 12:42:33 UTC
Fixed in selinux-policy-3.6.32-111.fc12

Comment 4 Fedora Update System 2010-04-23 12:44:12 UTC
selinux-policy-3.6.32-113.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-113.fc12

Comment 5 Fedora Update System 2010-04-27 02:22:49 UTC
selinux-policy-3.6.32-113.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update selinux-policy'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-113.fc12

Comment 6 Fedora Update System 2010-05-03 16:06:50 UTC
selinux-policy-3.6.32-113.fc12 has been pushed to the Fedora 12 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.