Bug 842513 - SELinux is preventing /usr/bin/perl from 'read' accesses on the file /etc/group.
SELinux is preventing /usr/bin/perl from 'read' accesses on the file /etc/group.
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
17
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
abrt_hash:1bba8f3773f4f51c61c0cc952c6...
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-24 00:54 EDT by Gideon Mayhak
Modified: 2012-08-01 14:21 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-08-01 14:21:40 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Gideon Mayhak 2012-07-24 00:54:09 EDT
libreport version: 2.0.10
executable:     /usr/bin/python2.7
hashmarkername: setroubleshoot
kernel:         3.4.6-2.fc17.x86_64
time:           Mon 23 Jul 2012 11:53:42 PM CDT

description:
:SELinux is preventing /usr/bin/perl from 'read' accesses on the file /etc/group.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that perl should be allowed read access on the group 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 editparams.cgi /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:httpd_bugzilla_script_t:s0
:Target Context                system_u:object_r:passwd_file_t:s0
:Target Objects                /etc/group [ file ]
:Source                        editparams.cgi
:Source Path                   /usr/bin/perl
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           perl-5.14.2-212.fc17.x86_64
:Target RPM Packages           setup-2.8.48-1.fc17.noarch
:Policy RPM                    selinux-policy-3.10.0-140.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.4.6-2.fc17.x86_64 #1 SMP Thu Jul 19
:                              22:54:16 UTC 2012 x86_64 x86_64
:Alert Count                   3
:First Seen                    Mon 23 Jul 2012 11:50:38 PM CDT
:Last Seen                     Mon 23 Jul 2012 11:50:45 PM CDT
:Local ID                      18aefd21-ca25-4e1d-a76c-7c8caa6ead51
:
:Raw Audit Messages
:type=AVC msg=audit(1343105445.381:225): avc:  denied  { read } for  pid=3936 comm="editparams.cgi" name="group" dev="dm-0" ino=1050214 scontext=system_u:system_r:httpd_bugzilla_script_t:s0 tcontext=system_u:object_r:passwd_file_t:s0 tclass=file
:
:
:type=SYSCALL msg=audit(1343105445.381:225): arch=x86_64 syscall=open success=no exit=EACCES a0=7f32a13c86bf a1=80000 a2=1b6 a3=238 items=0 ppid=1288 pid=3936 auid=4294967295 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none) ses=4294967295 comm=editparams.cgi exe=/usr/bin/perl subj=system_u:system_r:httpd_bugzilla_script_t:s0 key=(null)
:
:Hash: editparams.cgi,httpd_bugzilla_script_t,passwd_file_t,file,read
:
:audit2allowunable to open /sys/fs/selinux/policy:  Permission denied
:
:
:audit2allow -Runable to open /sys/fs/selinux/policy:  Permission denied
:
:
Comment 1 Miroslav Grepl 2012-07-24 04:25:35 EDT

*** This bug has been marked as a duplicate of bug 842507 ***
Comment 2 Gideon Mayhak 2012-07-24 10:32:22 EDT
This one is actually unrelated to Munin.  Sorry, I know I submitted them all rapid fire :-).  This one is for Bugzilla, and it is triggered when I go to save pages like Parameters under Administration.  I click Save Changes, and I get the following message:


There is no such group: apache. Check your $webservergroup setting in /etc/bugzilla/localconfig.

Traceback:

 at Bugzilla/Install/Filesystem.pm line 777
	Bugzilla::Install::Filesystem::_check_web_server_group(...) called at Bugzilla/Install/Filesystem.pm line 697
	Bugzilla::Install::Filesystem::_get_owner_and_group(...) called at Bugzilla/Install/Filesystem.pm line 649
	Bugzilla::Install::Filesystem::fix_file_permissions(...) called at Bugzilla/Config.pm line 304
	Bugzilla::Config::write_params(...) called at /usr/share/bugzilla/editparams.cgi line 154


This denial is then logged, so it seems to be getting denied access to /etc/passwd and /etc/group.

I should also note that for all of these, I tried creating a .pp using audit2allow -M and loading it with semodule -i, but it didn't seem to have any impact.  Everything indicated that the module was loaded properly, but it didn't actually allow the access afterward.
Comment 3 Miroslav Grepl 2012-07-27 07:13:28 EDT
Fixed in selinux-policy-3.10.0-142.fc17.noarch
Comment 4 Fedora Update System 2012-07-27 11:34:25 EDT
selinux-policy-3.10.0-142.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-142.fc17
Comment 5 Fedora Update System 2012-07-27 21:24:13 EDT
Package selinux-policy-3.10.0-142.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.10.0-142.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-11215/selinux-policy-3.10.0-142.fc17
then log in and leave karma (feedback).
Comment 6 Fedora Update System 2012-08-01 14:21:40 EDT
selinux-policy-3.10.0-142.fc17 has been pushed to the Fedora 17 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.