Bug 828408 - SELinux is preventing /usr/bin/postgres from 'read' accesses on the chr_file /dev/null.
Summary: SELinux is preventing /usr/bin/postgres from 'read' accesses on the chr_file ...
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: rawhide
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:c43c142aa49d11c15f51de0fad4...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-04 17:40 UTC by Nicolas Mailhot
Modified: 2012-06-04 20:00 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-04 20:00:51 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Nicolas Mailhot 2012-06-04 17:40:03 UTC
libreport version: 2.0.10
executable:     /usr/bin/python2.7
hashmarkername: setroubleshoot
kernel:         3.5.0-0.rc1.git0.1.fc18.x86_64
time:           lun. 04 juin 2012 19:28:19 CEST

description:
:SELinux is preventing /usr/bin/postgres from 'read' accesses on the chr_file /dev/null.
:
:*****  Plugin restorecon (93.9 confidence) suggests  *************************
:
:If you want to fix the label. 
:/dev/null default label should be null_device_t.
:Then you can run restorecon.
:Do
:# /sbin/restorecon -v /dev/null
:
:*****  Plugin leaks (6.10 confidence) suggests  ******************************
:
:If you want to ignore postgres trying to read access the null chr_file, because you believe it should not need this access.
:Then you should report this as a bug.  
:You can generate a local policy module to dontaudit this access.
:Do
:# grep /usr/bin/postgres /var/log/audit/audit.log | audit2allow -D -M mypol
:# semodule -i mypol.pp
:
:*****  Plugin catchall (1.43 confidence) suggests  ***************************
:
:If you believe that postgres should be allowed read access on the null chr_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 postgres /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:postgresql_t:s0
:Target Context                system_u:object_r:default_t:s0
:Target Objects                /dev/null [ chr_file ]
:Source                        postgres
:Source Path                   /usr/bin/postgres
:Port                          <Inconnu>
:Host                          (removed)
:Source RPM Packages           postgresql-server-9.1.4-1.fc18.x86_64
:Target RPM Packages           
: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.5.0-0.rc1.git0.1.fc18.x86_64 #1
:                              SMP Sun Jun 3 14:07:54 UTC 2012 x86_64 x86_64
:Alert Count                   1
:First Seen                    lun. 04 juin 2012 19:17:40 CEST
:Last Seen                     lun. 04 juin 2012 19:17:40 CEST
:Local ID                      ae3654d1-f07c-475b-8bdb-0428885ec8ee
:
:Raw Audit Messages
:type=AVC msg=audit(1338830260.976:171): avc:  denied  { read } for  pid=981 comm="postgres" path="/dev/null" dev="devtmpfs" ino=1033 scontext=system_u:system_r:postgresql_t:s0 tcontext=system_u:object_r:default_t:s0 tclass=chr_file
:
:
:type=AVC msg=audit(1338830260.976:171): avc:  denied  { write } for  pid=981 comm="postgres" path="/dev/null" dev="devtmpfs" ino=1033 scontext=system_u:system_r:postgresql_t:s0 tcontext=system_u:object_r:default_t:s0 tclass=chr_file
:
:
:type=SYSCALL msg=audit(1338830260.976:171): arch=x86_64 syscall=execve success=yes exit=0 a0=f6c640 a1=f6c850 a2=f6b5c0 a3=0 items=0 ppid=980 pid=981 auid=4294967295 uid=26 gid=26 euid=26 suid=26 fsuid=26 egid=26 sgid=26 fsgid=26 tty=(none) ses=4294967295 comm=postgres exe=/usr/bin/postgres subj=system_u:system_r:postgresql_t:s0 key=(null)
:
:Hash: postgres,postgresql_t,default_t,chr_file,read
:
:audit2allow
:
:#============= postgresql_t ==============
:allow postgresql_t default_t:chr_file { read write };
:
:audit2allow -R
:
:#============= postgresql_t ==============
:allow postgresql_t default_t:chr_file { read write };
:

Comment 1 Daniel Walsh 2012-06-04 20:00:51 UTC
Duplicate of 828375


Note You need to log in before you can comment on or make changes to this bug.