Bug 831076 - SELinux is preventing /usr/sbin/snort-plain from 'getattr' accesses on the file /etc/passwd.
SELinux is preventing /usr/sbin/snort-plain from 'getattr' accesses on the fi...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
18
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
abrt_hash:0aa43175477d9ef468d8f9aa9d1...
: Reopened
: 831077 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-12 03:08 EDT by mamii
Modified: 2013-08-14 22:53 EDT (History)
4 users (show)

See Also:
Fixed In Version: selinux-policy-3.11.1-100.fc18
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-14 22:53:11 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 mamii 2012-06-12 03:08:33 EDT
libreport version: 2.0.10
executable:     /usr/bin/python2.7
hashmarkername: setroubleshoot
kernel:         3.4.2-1.fc17.x86_64
time:           Tue 12 Jun 2012 08:07:22 AM CET

description:
:SELinux is preventing /usr/sbin/snort-plain from 'getattr' accesses on the file /etc/passwd.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that snort-plain should be allowed getattr access on the passwd 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 snort /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:snort_t:s0
:Target Context                system_u:object_r:passwd_file_t:s0
:Target Objects                /etc/passwd [ file ]
:Source                        snort
:Source Path                   /usr/sbin/snort-plain
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           snort-2.9.1.1-1.fc17.x86_64
:Target RPM Packages           setup-2.8.48-1.fc17.noarch
:Policy RPM                    selinux-policy-3.10.0-128.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Permissive
:Host Name                     (removed)
:Platform                      Linux (removed) 3.4.2-1.fc17.x86_64 #1 SMP
:                              Sat Jun 9 19:03:08 UTC 2012 x86_64 x86_64
:Alert Count                   1
:First Seen                    Tue 12 Jun 2012 08:05:52 AM CET
:Last Seen                     Tue 12 Jun 2012 08:05:52 AM CET
:Local ID                      eaf7f7e2-3563-4e19-8c45-c7e1843199f8
:
:Raw Audit Messages
:type=AVC msg=audit(1339484752.837:51): avc:  denied  { getattr } for  pid=1156 comm="snort" path="/etc/passwd" dev="dm-2" ino=918679 scontext=system_u:system_r:snort_t:s0 tcontext=system_u:object_r:passwd_file_t:s0 tclass=file
:
:
:type=SYSCALL msg=audit(1339484752.837:51): arch=x86_64 syscall=fstat success=yes exit=0 a0=3 a1=7fffd4d88e00 a2=7fffd4d88e00 a3=0 items=0 ppid=1155 pid=1156 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=snort exe=/usr/sbin/snort-plain subj=system_u:system_r:snort_t:s0 key=(null)
:
:Hash: snort,snort_t,passwd_file_t,file,getattr
:
:audit2allowunable to open /sys/fs/selinux/policy:  Permission denied
:
:
:audit2allow -Runable to open /sys/fs/selinux/policy:  Permission denied
:
:
Comment 1 Miroslav Grepl 2012-06-12 06:06:36 EDT
*** Bug 831077 has been marked as a duplicate of this bug. ***
Comment 2 Miroslav Grepl 2012-06-12 06:08:01 EDT
Fixed in selinux-policy-3.10.0-131.fc17
Comment 3 Fedora Update System 2012-06-19 03:58:19 EDT
selinux-policy-3.10.0-132.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-132.fc17
Comment 4 Fedora Update System 2012-06-19 20:28:42 EDT
selinux-policy-3.10.0-132.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 5 Fedora Update System 2012-07-19 05:16:36 EDT
selinux-policy-3.10.0-132.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 6 Rob Lowe 2013-06-24 19:01:41 EDT
This bug is also present in FC18:

Source Context                system_u:system_r:snort_t:s0
Target Context                system_u:object_r:passwd_file_t:s0
Target Objects                /etc/passwd [ file ]
Source                        snort
Source Path                   /usr/sbin/snort-plain
Port                          <Unknown>
Host                          [removed]
Source RPM Packages           snort-2.9.4-1.x86_64
Target RPM Packages           setup-2.8.57-1.fc18.noarch
Policy RPM                    selinux-policy-3.11.1-97.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     [removed]
Platform                      Linux [removed]
                              3.9.5-201.fc18.x86_64 #1 SMP Tue Jun 11 19:40:51
                              UTC 2013 x86_64 x86_64
Alert Count                   7
First Seen                    2013-06-11 07:37:02 EST
Last Seen                     2013-06-25 08:28:02 EST
Local ID                      bae61c47-6c85-4c6c-9ca0-6915368a52de

Raw Audit Messages
type=AVC msg=audit(1372112882.266:422): avc:  denied  { read } for  pid=3692 comm="snort" name="passwd" dev="dm-4" ino=13371997 scontext=system_u:system_r:snort_t:s0 tcontext=system_u:object_r:passwd_file_t:s0 tclass=file


type=SYSCALL msg=audit(1372112882.266:422): arch=x86_64 syscall=open success=no exit=EACCES a0=7f50895c06ca a1=80000 a2=1b6 a3=238 items=0 ppid=3691 pid=3692 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=snort exe=/usr/sbin/snort-plain subj=system_u:system_r:snort_t:s0 key=(null)

Hash: snort,snort_t,passwd_file_t,file,read

audit2allow

#============= snort_t ==============
allow snort_t passwd_file_t:file read;

audit2allow -R
require {
	type snort_t;
}

#============= snort_t ==============
auth_read_passwd(snort_t)
Comment 7 Miroslav Grepl 2013-07-01 04:45:35 EDT
commit f7c2bfc2f886234f4b3493c8325c79429478add8
Author: Miroslav Grepl <mgrepl@redhat.com>
Date:   Mon Jul 1 10:43:55 2013 +0200

    Allow snort to read /etc/passwd
Comment 8 Fedora Update System 2013-08-05 01:40:06 EDT
selinux-policy-3.11.1-99.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-99.fc18
Comment 9 Fedora Update System 2013-08-05 20:13:40 EDT
Package selinux-policy-3.11.1-99.fc18:
* should fix your issue,
* was pushed to the Fedora 18 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.11.1-99.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-14256/selinux-policy-3.11.1-99.fc18
then log in and leave karma (feedback).
Comment 10 Fedora Update System 2013-08-07 07:11:19 EDT
selinux-policy-3.11.1-100.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-100.fc18
Comment 11 Fedora Update System 2013-08-14 22:53:11 EDT
selinux-policy-3.11.1-100.fc18 has been pushed to the Fedora 18 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.