Bug 548863 - SELinux is preventing /usr/libexec/polkit-1/polkit-agent-helper-1 access to a leaked /tmp/log file descriptor.
SELinux is preventing /usr/libexec/polkit-1/polkit-agent-helper-1 access to a...
Product: Fedora
Classification: Fedora
Component: polkit (Show other bugs)
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: David Zeuthen
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2009-12-18 16:21 EST by Alex Lancaster
Modified: 2013-03-05 23:00 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-12-03 20:29:17 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
excerpt from bottom of /tmp/log (24.35 KB, text/plain)
2009-12-18 16:39 EST, Alex Lancaster
no flags Details

  None (edit)
Description Alex Lancaster 2009-12-18 16:21:53 EST

SELinux is preventing /usr/libexec/polkit-1/polkit-agent-helper-1 access to a
leaked /tmp/log file descriptor.

Detailed Description:

[polkit-agent-he has a permissive type (policykit_auth_t). This access was not

SELinux denied access requested by the polkit-agent-he command. It looks like
this is either a leaked descriptor or polkit-agent-he 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/log. 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

Additional Information:

Source Context                unconfined_u:unconfined_r:policykit_auth_t:s0-s0:c
Target Context                unconfined_u:object_r:user_tmp_t:s0
Target Objects                /tmp/log [ file ]
Source                        polkit-agent-he
Source Path                   /usr/libexec/polkit-1/polkit-agent-helper-1
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           polkit-0.95-0.git20090913.3.fc12
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-56.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   leaks
Host Name                     (removed)
Platform                      Linux (removed)
                              #1 SMP Wed Dec 9 10:46:22 EST 2009 x86_64 x86_64
Alert Count                   1
First Seen                    Fri 18 Dec 2009 04:19:40 PM EST
Last Seen                     Fri 18 Dec 2009 04:19:40 PM EST
Local ID                      6a4fcb30-0947-440f-8e5a-5f2ecca58164
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1261171180.252:42): avc:  denied  { write } for  pid=3461 comm="polkit-agent-he" path="/tmp/log" dev=dm-0 ino=6236 scontext=unconfined_u:unconfined_r:policykit_auth_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_tmp_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1261171180.252:42): arch=c000003e syscall=59 success=yes exit=0 a0=306280d7b8 a1=7fff57209760 a2=7fff57209a58 a3=b items=0 ppid=2140 pid=3461 auid=501 uid=501 gid=100 euid=0 suid=0 fsuid=0 egid=100 sgid=100 fsgid=100 tty=(none) ses=2 comm="polkit-agent-he" exe="/usr/libexec/polkit-1/polkit-agent-helper-1" subj=unconfined_u:unconfined_r:policykit_auth_t:s0-s0:c0.c1023 key=(null)

Hash String generated from  selinux-policy-3.6.32-56.fc12,leaks,polkit-agent-he,policykit_auth_t,user_tmp_t,file,write
audit2allow suggests:

#============= policykit_auth_t ==============
allow policykit_auth_t user_tmp_t:file write;
Comment 1 Alex Lancaster 2009-12-18 16:23:21 EST
This occurred at the moment I clicked "Apply" after I unchecked the "Connecting automatically" checkbox in the NetworkManager "Edit Connections" dialog.
Comment 2 Daniel Walsh 2009-12-18 16:29:57 EST
Is NetworkManager creating a file in /tmp/log?
Comment 3 Alex Lancaster 2009-12-18 16:39:39 EST
Created attachment 379302 [details]
excerpt from bottom of /tmp/log

Yes it adds some info to the bottom of that file.
Comment 4 Daniel Walsh 2009-12-21 09:26:12 EST
Well NetworkManager should not be creating this file in /tmp, probably should go under /var/log/NetworkManager

And it should close it on exec

fcntl(fd, F_SETFD, FD_CLOEXEC)
Comment 5 Dan Williams 2010-06-25 20:18:09 EDT
Which file exactly is getting written to?  NM doesn't actually open any file in /tmp, so this is probably PolicyKit.
Comment 6 Bug Zapper 2010-11-03 23:01:02 EDT
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '12'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 12's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 12 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
Comment 7 Bug Zapper 2010-12-03 20:29:17 EST
Fedora 12 changed to end-of-life (EOL) status on 2010-12-02. Fedora 12 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

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