Bug 666765 - SELinux is preventing /sbin/consoletype from 'read' accesses on the file /tmp/update_spamassassin.0102.
Summary: SELinux is preventing /sbin/consoletype from 'read' accesses on the file /tmp...
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: spamassassin
Version: 14
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
Assignee: Warren Togami
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:5ab235feae5...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-03 03:43 UTC by Chris Schanzle
Modified: 2011-01-04 16:05 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-01-04 16:05:54 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Chris Schanzle 2011-01-03 03:43:02 UTC
SELinux is preventing /sbin/consoletype from 'read' accesses on the file /tmp/update_spamassassin.0102.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that consoletype should be allowed read access on the update_spamassassin.0102 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 /sbin/consoletype /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:consoletype_t:s0
Target Context                system_u:object_r:system_cronjob_tmp_t:s0
Target Objects                /tmp/update_spamassassin.0102 [ file ]
Source                        consoletype
Source Path                   /sbin/consoletype
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           initscripts-9.20.1-1.fc14
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.7-18.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.35.10-72.fc14.i686 #1
                              SMP Mon Dec 20 22:05:49 UTC 2010 i686 i686
Alert Count                   8
First Seen                    Sun 26 Dec 2010 04:02:36 AM EST
Last Seen                     Sun 02 Jan 2011 03:49:07 AM EST
Local ID                      f50d6be0-6c3d-447c-8e3a-1af2f8853f90

Raw Audit Messages
type=AVC msg=audit(1293958147.42:62296): avc:  denied  { read } for  pid=30430 comm="consoletype" path="/tmp/update_spamassassin.0102" dev=dm-0 ino=1450 scontext=system_u:system_r:consoletype_t:s0 tcontext=system_u:object_r:system_cronjob_tmp_t:s0 tclass=file

consoletype,consoletype_t,system_cronjob_tmp_t,file,read
type=SYSCALL msg=audit(1293958147.42:62296): arch=i386 syscall=execve success=yes exit=0 a0=8305500 a1=8305578 a2=82fe9e0 a3=8305578 items=0 ppid=30429 pid=30430 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=3355 comm=consoletype exe=/sbin/consoletype subj=system_u:system_r:consoletype_t:s0 key=(null)
consoletype,consoletype_t,system_cronjob_tmp_t,file,read

#============= consoletype_t ==============
allow consoletype_t system_cronjob_tmp_t:file read;

Comment 1 Miroslav Grepl 2011-01-03 17:48:49 UTC
Looks like a leak descriptor. You can dontaudit it using

# grep consoletype /var/log/audit/audit.log | audit2allow -D -M mypol
# semodule -i mypol.pp

Comment 2 Chris Schanzle 2011-01-04 02:44:39 UTC
Hi - rather than paper over the alert ... is this likely from /etc/cron.daily/update_spamassassin ?  Should the spamassassin guys be taking a look?  I'd be happy to modify the script to help find out, but not sure of the techniques.

Comment 3 Daniel Walsh 2011-01-04 14:38:25 UTC
Yes, they should be closing this file descriptor on exec.  Also why are they using /tmp for a process running as root?

Comment 4 Kevin Fenzi 2011-01-04 15:43:13 UTC
I'm sure we would be open to adjustments to our spamassassin cron script, but is that ours or did you install from upstream? 

We use /etc/cron.d/sa-update

It sounds like you have a /etc/cron.daily/update_spamassassin script? Where did you get it?

Comment 5 Chris Schanzle 2011-01-04 16:05:54 UTC
Ah, dang.  My bad for not checking:

rpm -qf  /etc/cron.daily/update_spamassassin
mailscanner-4.81.4-1.noarch

I'll work with the MailScanner.info guys to get this fixed.  Closing.  Thank you!


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