Bug 560644 - SELinux is preventing /sbin/rsyslogd "search" access on /var/lib/mysql.
Summary: SELinux is preventing /sbin/rsyslogd "search" access on /var/lib/mysql.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 12
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:334d99cf8d2...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-02-01 13:41 UTC by Nikolay Bryskin
Modified: 2010-02-11 14:42 UTC (History)
2 users (show)

Fixed In Version: 3.6.32-84.fc12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-02-11 14:42:21 UTC


Attachments (Terms of Use)

Description Nikolay Bryskin 2010-02-01 13:41:31 UTC
Summary:

SELinux is preventing /sbin/rsyslogd "search" access on /var/lib/mysql.

Detailed Description:

[SELinux is in permissive mode. This access was not denied.]

SELinux denied access requested by rsyslogd. It is not expected that this access
is required by rsyslogd 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:syslogd_t:s0
Target Context                system_u:object_r:mysqld_db_t:s0
Target Objects                /var/lib/mysql [ dir ]
Source                        rsyslogd
Source Path                   /sbin/rsyslogd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           rsyslog-4.4.2-1.fc12
Target RPM Packages           mysql-server-5.1.42-2.fc12
Policy RPM                    selinux-policy-3.6.32-73.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.31.12-174.2.3.fc12.x86_64 #1 SMP Mon Jan 18
                              19:52:07 UTC 2010 x86_64 x86_64
Alert Count                   71
First Seen                    Tue 08 Dec 2009 10:50:08 AM MSK
Last Seen                     Sun 31 Jan 2010 03:25:18 AM MSK
Local ID                      f0b5330a-3967-4abd-8607-4a412359e2e6
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1264897518.587:273636): avc:  denied  { search } for  pid=30121 comm="rsyslogd" name="mysql" dev=dm-0 ino=192480 scontext=system_u:system_r:syslogd_t:s0 tcontext=system_u:object_r:mysqld_db_t:s0 tclass=dir

node=(removed) type=AVC msg=audit(1264897518.587:273636): avc:  denied  { write } for  pid=30121 comm="rsyslogd" name="mysql.sock" dev=dm-0 ino=131075 scontext=system_u:system_r:syslogd_t:s0 tcontext=system_u:object_r:mysqld_var_run_t:s0 tclass=sock_file

node=(removed) type=AVC msg=audit(1264897518.587:273636): avc:  denied  { connectto } for  pid=30121 comm="rsyslogd" path="/var/lib/mysql/mysql.sock" scontext=system_u:system_r:syslogd_t:s0 tcontext=system_u:system_r:mysqld_t:s0 tclass=unix_stream_socket

node=(removed) type=SYSCALL msg=audit(1264897518.587:273636): arch=c000003e syscall=42 success=yes exit=128 a0=9 a1=7f9821b21660 a2=6e a3=4000 items=0 ppid=1 pid=30121 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="rsyslogd" exe="/sbin/rsyslogd" subj=system_u:system_r:syslogd_t:s0 key=(null)



Hash String generated from  selinux-policy-3.6.32-73.fc12,catchall,rsyslogd,syslogd_t,mysqld_db_t,dir,search
audit2allow suggests:

#============= syslogd_t ==============
allow syslogd_t mysqld_db_t:dir search;
allow syslogd_t mysqld_t:unix_stream_socket connectto;
allow syslogd_t mysqld_var_run_t:sock_file write;

Comment 1 Daniel Walsh 2010-02-01 20:57:15 UTC
I guess syslog has a msql back end?

Miroslav add


optional_policy(`
	mysql_stream_connect(syslogd_t)
')

Comment 2 Nikolay Bryskin 2010-02-02 07:07:03 UTC
(In reply to comment #1)
> I guess syslog has a msql back end?
> 
> Miroslav add
> 
> 
> optional_policy(`
>  mysql_stream_connect(syslogd_t)
> ')    

Yes, it has.

Comment 3 Miroslav Grepl 2010-02-02 13:41:13 UTC
Fixed in selinux-policy-3.6.32-81.fc12

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

Comment 5 Fedora Update System 2010-02-05 01:44:54 UTC
selinux-policy-3.6.32-84.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/F12/FEDORA-2010-1492

Comment 6 Fedora Update System 2010-02-11 14:37:39 UTC
selinux-policy-3.6.32-84.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.