Bug 575319 - SELinux is preventing /sbin/setfiles access to a leaked /var/spool/at/spool/a000030142bc1e file descriptor.
Summary: SELinux is preventing /sbin/setfiles access to a leaked /var/spool/at/spool/a...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 12
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:16b34044c12...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-03-20 01:10 UTC by Mike Evans
Modified: 2010-03-30 02:12 UTC (History)
2 users (show)

Fixed In Version: selinux-policy-3.6.32-106.fc12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-30 02:12:00 UTC
Type: ---


Attachments (Terms of Use)

Description Mike Evans 2010-03-20 01:10:57 UTC
Summary:

SELinux is preventing /sbin/setfiles access to a leaked
/var/spool/at/spool/a000030142bc1e file descriptor.

Detailed Description:

[restorecon has a permissive type (setfiles_t). This access was not denied.]

SELinux denied access requested by the restorecon command. It looks like this is
either a leaked descriptor or restorecon output was redirected to a file it is
not allowed to access. Leaks usually can be ignored since SELinux is just
closing the leak and reporting the error. The application does not use the
descriptor, so it will run properly. If this is a redirection, you will not get
output in the /var/spool/at/spool/a000030142bc1e. You should generate a bugzilla
on selinux-policy, and it will get routed to the appropriate package. You can
safely ignore this avc.

Allowing Access:

You can generate a local policy module to allow this access - see FAQ
(http://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385)

Additional Information:

Source Context                unconfined_u:system_r:setfiles_t:s0-s0:c0.c1023
Target Context                system_u:object_r:user_cron_spool_t:s0
Target Objects                /var/spool/at/spool/a000030142bc1e [ file ]
Source                        restorecon
Source Path                   /sbin/setfiles
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           policycoreutils-2.0.78-10.fc12
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-69.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   leaks
Host Name                     (removed)
Platform                      Linux florence 2.6.31.12-174.2.3.fc12.i686.PAE #1
                              SMP Mon Jan 18 20:06:44 UTC 2010 i686 athlon
Alert Count                   3
First Seen                    Sat 20 Mar 2010 00:37:26 GMT
Last Seen                     Sat 20 Mar 2010 00:37:27 GMT
Local ID                      2cc35629-b07b-4dc4-a32c-92ebf4a89233
Line Numbers                  

Raw Audit Messages            

node=florence type=AVC msg=audit(1269045447.576:176): avc:  denied  { write } for  pid=11271 comm="restorecon" path="/var/spool/at/spool/a000030142bc1e" dev=sda2 ino=20058 scontext=unconfined_u:system_r:setfiles_t:s0-s0:c0.c1023 tcontext=system_u:object_r:user_cron_spool_t:s0 tclass=file

node=florence type=SYSCALL msg=audit(1269045447.576:176): arch=40000003 syscall=11 success=yes exit=0 a0=9620cc0 a1=9620850 a2=9620900 a3=9620850 items=0 ppid=10943 pid=11271 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=20 comm="restorecon" exe="/sbin/setfiles" subj=unconfined_u:system_r:setfiles_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  leaks,restorecon,setfiles_t,user_cron_spool_t,file,write
audit2allow suggests:

#============= setfiles_t ==============
allow setfiles_t user_cron_spool_t:file write;

Comment 1 Mike Evans 2010-03-20 01:16:47 UTC
experienced whilst running:

  yum -yq --skip-broken update

under control of 'at' running as root.  (ran 'sudo at 0030')

During the same update similar denials were issued to:

/usr/sbin/tzdata-update
/usr/bin/python
/usr/sbin/nscd
/usr/bin/groupdel

All for the same file

Comment 2 Daniel Walsh 2010-03-22 15:41:10 UTC
Miroslav add

	cron_rw_inherited_user_spool_files(application_domain_type)

And

	cron_rw_inherited_user_spool_files(daemon)

And

########################################
## <summary>
##	Read and write inherited user spool files.
## </summary>
## <param name="domain">
##	<summary>
##	Domain allowed access.
##	</summary>
## </param>
#
interface(`cron_rw_inherited_user_spool_files',`
	gen_require(`
		type user_cron_spool_t;
	')

	allow $1 user_cron_spool_t:file rw_inherited_file_perms;
')

Comment 3 Miroslav Grepl 2010-03-23 12:28:56 UTC
Fixed in selinux-policy-3.6.32-106.fc12

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

Comment 5 Fedora Update System 2010-03-24 23:30:52 UTC
selinux-policy-3.6.32-106.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/selinux-policy-3.6.32-106.fc12

Comment 6 Mike Evans 2010-03-25 09:05:32 UTC
Installed update OK today.  Will run the same command as caused the original error reports overnight and report back.

Comment 7 Mike Evans 2010-03-26 10:34:49 UTC
Update ran and completed.  No SELinux alerts raised.  From my perspective this can be closed.  Many thanks.

Comment 8 Fedora Update System 2010-03-30 02:10:24 UTC
selinux-policy-3.6.32-106.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.