Bug 732224

Summary: AVC problems with spamassassin's nightly update run with unconfined off
Product: [Fedora] Fedora Reporter: Robin Powell <rlpowell>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: selinux-policy-3.9.16-48.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-04 02:34:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Robin Powell 2011-08-21 01:14:16 UTC
I simulated the run like this:

sudo runcon system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 sh -c "/usr/share/spamassassin/sa-update.cron 2>&1 | tee -a /var/log/sa-update.log"

(that's from cron.d, and takes Quite A While to run) with enforcing turned off.  Here's the complaints, which seem to match what actually happened during the nightly run:

type=AVC msg=audit(1313877917.646:693368): avc:  denied  { read } for  pid=14117 comm="grep" name="sought.conf" dev=vda2 ino=268233 scontext=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 tcontext=system_u:object_r:etc_mail_t:s0 tclass=file
type=AVC msg=audit(1313877917.646:693368): avc:  denied  { open } for  pid=14117 comm="grep" name="sought.conf" dev=vda2 ino=268233 scontext=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 tcontext=system_u:object_r:etc_mail_t:s0 tclass=file
type=AVC msg=audit(1313877917.646:693369): avc:  denied  { ioctl } for  pid=14117 comm="grep" path="/etc/mail/spamassassin/channel.d/sought.conf" dev=vda2 ino=268233 scontext=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 tcontext=system_u:object_r:etc_mail_t:s0 tclass=file
type=AVC msg=audit(1313877926.893:693373): avc:  denied  { read } for  pid=14120 comm="sa-update" name="shadow" dev=vda2 ino=264049 scontext=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 tcontext=system_u:object_r:shadow_t:s0 tclass=file
type=AVC msg=audit(1313877926.893:693373): avc:  denied  { open } for  pid=14120 comm="sa-update" name="shadow" dev=vda2 ino=264049 scontext=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 tcontext=system_u:object_r:shadow_t:s0 tclass=file
type=AVC msg=audit(1313877929.563:693376): avc:  denied  { setrlimit } for  pid=14121 comm="gpg" scontext=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 tcontext=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 tclass=process
type=AVC msg=audit(1313877929.589:693377): avc:  denied  { ipc_lock } for  pid=14121 comm="gpg" capability=14  scontext=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 tcontext=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 tclass=capability
type=AVC msg=audit(1313878046.835:693474): avc:  denied  { signal } for  pid=14142 comm="zsh" scontext=staff_u:staff_r:staff_t:s0 tcontext=staff_u:unconfined_r:unconfined_t:s0 tclass=process
type=AVC msg=audit(1313883171.242:695645): avc:  denied  { read } for  pid=15326 comm="sa-update" name="shadow" dev=vda2 ino=264049 scontext=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 tcontext=system_u:object_r:shadow_t:s0 tclass=file
type=AVC msg=audit(1313883171.242:695645): avc:  denied  { open } for  pid=15326 comm="sa-update" name="shadow" dev=vda2 ino=264049 scontext=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 tcontext=system_u:object_r:shadow_t:s0 tclass=file

That zsh signal in the middle there is probably irrelevant crap.

-Robin

Comment 1 Daniel Walsh 2011-08-22 18:15:53 UTC
Miroslav, I think we need a policy for sa-update running out of cron jobs.


I added a preliminary policy to F16.

Comment 2 Miroslav Grepl 2011-08-23 10:16:07 UTC
Fixed in selinux-policy-3.9.16-39.fc15

Comment 3 Fedora Update System 2011-09-08 08:12:31 UTC
selinux-policy-3.9.16-39.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-39.fc15

Comment 4 Fedora Update System 2011-09-09 05:28:37 UTC
Package selinux-policy-3.9.16-39.fc15:
* should fix your issue,
* was pushed to the Fedora 15 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.9.16-39.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-39.fc15
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2011-10-06 00:03:00 UTC
selinux-policy-3.9.16-39.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Robin Powell 2011-10-07 23:55:26 UTC
Running:

selinux-policy.noarch                                                                                3.9.16-42.fc15 
selinux-policy-targeted.noarch                                                                       3.9.16-42.fc15 

This is not fixed.  Sorry I didn't notify earlier.

Here's what I'm getting with setenforce 0:


type=AVC msg=audit(10/07/2011 16:53:02.360:333529) : avc:  denied  { open } for  pid=18056 comm=grep name=sought.conf dev=vda2 ino=268233 scontext=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 tcontext=system_u:object_r:etc_mail_t:s0 tclass=file
type=AVC msg=audit(10/07/2011 16:53:02.360:333529) : avc:  denied  { read } for  pid=18056 comm=grep name=sought.conf dev=vda2 ino=268233 scontext=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 tcontext=system_u:object_r:etc_mail_t:s0 tclass=file
type=AVC msg=audit(10/07/2011 16:53:02.360:333530) : avc:  denied  { ioctl } for  pid=18056 comm=grep path=/etc/mail/spamassassin/channel.d/sought.conf dev=vda2 ino=268233 scontext=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 tcontext=system_u:object_r:etc_mail_t:s0 tclass=file
type=AVC msg=audit(10/07/2011 16:53:03.256:333536) : avc:  denied  { open } for  pid=18063 comm=sh name=meminfo dev=proc ino=4026532008 scontext=system_u:system_r:spamd_update_t:s0-s0:c0.c1023 tcontext=system_u:object_r:proc_t:s0 tclass=file
type=AVC msg=audit(10/07/2011 16:53:03.256:333536) : avc:  denied  { read } for  pid=18063 comm=sh name=meminfo dev=proc ino=4026532008 scontext=system_u:system_r:spamd_update_t:s0-s0:c0.c1023 tcontext=system_u:object_r:proc_t:s0 tclass=file
type=AVC msg=audit(10/07/2011 16:53:03.256:333537) : avc:  denied  { getattr } for  pid=18063 comm=sh path=/proc/meminfo dev=proc ino=4026532008 scontext=system_u:system_r:spamd_update_t:s0-s0:c0.c1023 tcontext=system_u:object_r:proc_t:s0 tclass=file
type=AVC msg=audit(10/07/2011 16:53:03.242:333535) : avc:  denied  { execute_no_trans } for  pid=18063 comm=sa-update path=/bin/bash dev=vda2 ino=136026 scontext=system_u:system_r:spamd_update_t:s0-s0:c0.c1023 tcontext=system_u:object_r:shell_exec_t:s0 tclass=file
type=AVC msg=audit(10/07/2011 16:53:03.242:333535) : avc:  denied  { read open } for  pid=18063 comm=sa-update name=bash dev=vda2 ino=136026 scontext=system_u:system_r:spamd_update_t:s0-s0:c0.c1023 tcontext=system_u:object_r:shell_exec_t:s0 tclass=file
type=AVC msg=audit(10/07/2011 16:53:03.242:333535) : avc:  denied  { execute } for  pid=18063 comm=sa-update name=bash dev=vda2 ino=136026 scontext=system_u:system_r:spamd_update_t:s0-s0:c0.c1023 tcontext=system_u:object_r:shell_exec_t:s0 tclass=file
type=AVC msg=audit(10/07/2011 16:53:03.257:333538) : avc:  denied  { getattr } for  pid=18063 comm=sh path=/bin/bash dev=vda2 ino=136026 scontext=system_u:system_r:spamd_update_t:s0-s0:c0.c1023 tcontext=system_u:object_r:shell_exec_t:s0 tclass=file

This seems to include some stuff that I reported before, and some stuff I didn't; I don't know why.

-Robin

Comment 7 Robin Powell 2011-10-07 23:59:18 UTC
It is perhaps worth noting that this time I actually let cron run it (after commenting out the sleep line in the cron script).

-Robin

Comment 8 Miroslav Grepl 2011-10-10 11:02:46 UTC
Fixed in selinux-policy-3.9.16-43.fc15

Comment 9 Fedora Update System 2011-11-16 16:16:27 UTC
selinux-policy-3.9.16-48.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-48.fc15

Comment 10 Fedora Update System 2011-11-17 23:34:50 UTC
Package selinux-policy-3.9.16-48.fc15:
* should fix your issue,
* was pushed to the Fedora 15 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.9.16-48.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-16023/selinux-policy-3.9.16-48.fc15
then log in and leave karma (feedback).

Comment 11 Fedora Update System 2011-12-04 02:34:29 UTC
selinux-policy-3.9.16-48.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.