Bug 578320 - SELinux is preventing /usr/sbin/semodule access to a leaked /tmp/tmpJIf0sR file descriptor.
Summary: SELinux is preventing /usr/sbin/semodule access to a leaked /tmp/tmpJIf0sR fi...
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:9f82fd4a212...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-03-30 20:59 UTC by Dan
Modified: 2010-12-28 13:46 UTC (History)
5 users (show)

Fixed In Version: selinux-policy-3.6.32-110.fc12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-04-20 13:19:52 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Dan 2010-03-30 20:59:07 UTC
Summary:

SELinux is preventing /usr/sbin/semodule access to a leaked /tmp/tmpJIf0sR file
descriptor.

Detailed Description:

[semodule has a permissive type (semanage_t). This access was not denied.]

SELinux denied access requested by the semodule command. It looks like this is
either a leaked descriptor or semodule 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 /tmp/tmpJIf0sR. 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://docs.fedoraproject.org/selinux-faq-fc5/#id2961385)

Additional Information:

Source Context                unconfined_u:unconfined_r:semanage_t:s0-s0:c0.c102
                              3
Target Context                unconfined_u:object_r:user_tmp_t:s0
Target Objects                /tmp/tmpJIf0sR [ file ]
Source                        semodule
Source Path                   /usr/sbin/semodule
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           policycoreutils-2.0.79-1.fc12
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-103.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   leaks
Host Name                     (removed)
Platform                      Linux (removed) 2.6.32.9-70.fc12.x86_64 #1 SMP Wed Mar
                              3 04:40:41 UTC 2010 x86_64 x86_64
Alert Count                   3
First Seen                    Tue 30 Mar 2010 21:57:57 BST
Last Seen                     Tue 30 Mar 2010 21:57:58 BST
Local ID                      51837c21-4624-4832-a1b7-83bf64ba25f2
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1269982678.557:30): avc:  denied  { write } for  pid=31113 comm="semodule" path="/tmp/tmpJIf0sR" dev=dm-0 ino=2772 scontext=unconfined_u:unconfined_r:semanage_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_tmp_t:s0 tclass=file

node=(removed) type=AVC msg=audit(1269982678.557:30): avc:  denied  { write } for  pid=31113 comm="semodule" path="/tmp/tmpJIf0sR" dev=dm-0 ino=2772 scontext=unconfined_u:unconfined_r:semanage_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_tmp_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1269982678.557:30): arch=c000003e syscall=59 success=yes exit=0 a0=28477d0 a1=2847890 a2=2840d10 a3=6c8 items=0 ppid=31112 pid=31113 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts1 ses=1 comm="semodule" exe="/usr/sbin/semodule" subj=unconfined_u:unconfined_r:semanage_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  leaks,semodule,semanage_t,user_tmp_t,file,write
audit2allow suggests:

#============= semanage_t ==============
allow semanage_t user_tmp_t:file write;

Comment 1 Dan 2010-03-30 21:02:13 UTC
Using YumEx to perform an update cause this SE Linux alert.

Comment 2 Daniel Walsh 2010-03-31 14:14:41 UTC
This is basically a leaked file descriptor or a resigining of stdout to apps that are executed in the rpm chain.  It can be safely ignored.

Comment 3 Daniel Walsh 2010-03-31 14:17:47 UTC
Miroslav, 

Add

	userdom_dontaudit_write_user_tmp_files($1)

to init_system_domain

Comment 4 Miroslav Grepl 2010-04-02 08:01:12 UTC
Fixed in selinux-policy-3.6.32-109.fc12

Comment 5 Fedora Update System 2010-04-09 13:25:51 UTC
selinux-policy-3.6.32-110.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-110.fc12

Comment 6 Fedora Update System 2010-04-10 10:30:43 UTC
selinux-policy-3.6.32-110.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-110.fc12

Comment 7 Fedora Update System 2010-04-20 13:19:15 UTC
selinux-policy-3.6.32-110.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.