Bug 610521 - SELinux is preventing /usr/sbin/groupadd access to a leaked /tmp/tmpLOtwKc file descriptor.
SELinux is preventing /usr/sbin/groupadd access to a leaked /tmp/tmpLOtwKc fi...
Status: CLOSED DUPLICATE of bug 607399
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
13
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
setroubleshoot_trace_hash:730ee960a4e...
:
: 610527 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-02 05:46 EDT by Mads Kiilerich
Modified: 2012-01-28 02:58 EST (History)
374 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-07-02 05:57:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mads Kiilerich 2010-07-02 05:46:05 EDT
Summary:

SELinux is preventing /usr/sbin/groupadd access to a leaked /tmp/tmpLOtwKc file
descriptor.

Detailed Description:

[groupadd has a permissive type (groupadd_t). This access was not denied.]

SELinux denied access requested by the groupadd command. It looks like this is
either a leaked descriptor or groupadd 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/tmpLOtwKc. 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                system_u:system_r:groupadd_t:s0-s0:c0.c1023
Target Context                system_u:object_r:initrc_tmp_t:s0
Target Objects                /tmp/tmpLOtwKc [ file ]
Source                        groupadd
Source Path                   /usr/sbin/groupadd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           shadow-utils-4.1.4.2-7.fc13
Target RPM Packages           
Policy RPM                    selinux-policy-3.7.19-28.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   leaks
Host Name                     (removed)
Platform                      Linux (removed) 2.6.33.5-124.fc13.i686.PAE #1 SMP Fri
                              Jun 11 09:42:24 UTC 2010 i686 i686
Alert Count                   2
First Seen                    Fri 02 Jul 2010 11:44:57 AM CEST
Last Seen                     Fri 02 Jul 2010 11:44:57 AM CEST
Local ID                      0a1cfa32-91fd-4144-b5d8-4ce041e351d6
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1278063897.886:20523): avc:  denied  { read append } for  pid=15818 comm="groupadd" path="/tmp/tmpLOtwKc" dev=sda3 ino=83291 scontext=system_u:system_r:groupadd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:initrc_tmp_t:s0 tclass=file

node=(removed) type=AVC msg=audit(1278063897.886:20523): avc:  denied  { read append } for  pid=15818 comm="groupadd" path="/tmp/tmpLOtwKc" dev=sda3 ino=83291 scontext=system_u:system_r:groupadd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:initrc_tmp_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1278063897.886:20523): arch=40000003 syscall=11 success=yes exit=0 a0=9e449c0 a1=9e43ee8 a2=9e43bb8 a3=9e43ee8 items=0 ppid=15817 pid=15818 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="groupadd" exe="/usr/sbin/groupadd" subj=system_u:system_r:groupadd_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  leaks,groupadd,groupadd_t,initrc_tmp_t,file,read,append
audit2allow suggests:

#============= groupadd_t ==============
allow groupadd_t initrc_tmp_t:file { read append };
Comment 1 Mads Kiilerich 2010-07-02 05:53:18 EDT
*** Bug 610527 has been marked as a duplicate of this bug. ***
Comment 2 Mads Kiilerich 2010-07-02 05:53:45 EDT
Bug 610527 happened at the same and references the same temp file but with a different tool, so I guess they have the same cause and are more or less duplicates.
Comment 3 Mads Kiilerich 2010-07-02 05:57:19 EDT

*** This bug has been marked as a duplicate of bug 607399 ***
Comment 4 Donald Edward Winslow 2010-07-10 12:33:48 EDT
I'm also getting similar AVC denials with ncsd.
Comment 5 Donald Edward Winslow 2010-07-10 12:35:11 EDT
I meant nscd.
Comment 6 Mads Kiilerich 2010-07-12 07:14:11 EDT
This is 100% reproducible with PackageKit but works fine with yum:

After
yum -y downgrade 'avahi*'
I have
avahi-0.6.25-6.fc13.i686
avahi-autoipd-0.6.25-6.fc13.i686
avahi-ui-0.6.25-6.fc13.i686
avahi-gobject-0.6.25-6.fc13.i686
avahi-sharp-0.6.25-6.fc13.i686
avahi-tools-0.6.25-6.fc13.i686
avahi-compat-libdns_sd-0.6.25-6.fc13.i686
avahi-glib-0.6.25-6.fc13.i686
avahi-devel-0.6.25-6.fc13.i686

I get the error when PackageKit updates to
avahi-compat-libdns_sd-0.6.25-7.fc13.i686
avahi-glib-0.6.25-7.fc13.i686
avahi-devel-0.6.25-7.fc13.i686
avahi-0.6.25-7.fc13.i686
avahi-autoipd-0.6.25-7.fc13.i686
avahi-gobject-0.6.25-7.fc13.i686
avahi-ui-0.6.25-7.fc13.i686
avahi-sharp-0.6.25-7.fc13.i686
avahi-tools-0.6.25-7.fc13.i686

I assume that the error comes from the avahi package' preinstall scriptlet:
/usr/sbin/groupadd -f -r avahi

I assume that the problem is with packagekit or the selinux labeling?

Using:
rpm-4.8.1-2.fc13.i686
yum-3.2.27-4.fc13.noarch
PackageKit-0.6.6-1.fc13.i686
selinux-policy-3.7.19-33.fc13.noarch
Comment 7 Miroslav Grepl 2010-07-12 07:24:36 EDT
Yes, 

chcon -t rpm_exec_t /usr/libexec/packagekitd


will fix for now.
Comment 8 evarie 2010-07-12 12:24:19 EDT
also see https://bugzilla.redhat.com/show_bug.cgi?id=612327


>Is it PackageKit or selinux-policy?


For me it is signed with SELinux.
I have a picture of de problems url=http://www.evarie.dse.nl/fedora13/SELinux.Troubleshoot_error-log.jpg

In this picture, you can see that the error is coming
form a temporary file at /tmp/tmpqddjbt

And the error was came after my first fresh installed Fedora 13 on my Dell Optiplex GX260 with a internet connection.

The picture has the text:
SELinux blocked entry till a lekaged file write.

SELinux belet  /usr/sbin/semodule toegang tot een gelekte /tmp/tmpqddjbt bestands beschrijving. 

/sbin/setfiles/     /tmp/tmpqddjbt

/usr/sbin/tzdata-update    /tmp/tmpqddjbt

/usr/sbin/groupadd         /tmp/tmpqddjbt
Comment 9 Filip Hristov 2010-07-12 21:36:13 EDT
That went on during the update immediate after the installation.
My machine is Intel P45 with Nvidia PCI-E GC.
Comment 10 Filip Hristov 2010-07-12 22:14:33 EDT
That went on during the last update (from 08.july.2010) immediate after install
Fedora 13 on my computer - it is the same bug as this up of evarie.
My machine is Intel P45 with Nvidia PCI-E GC.
Comment 11 Lucas 2010-08-17 16:32:27 EDT
This message came after removing open office, after doing a lengthy fedora update and after restarting my pc.
Comment 12 Jeremy Di Pietro 2010-09-28 16:15:12 EDT
(In reply to comment #0)


I get the bug when I try to run dosemu, I also get this on the screen:


LOWRAM mmap: Permission denied
Cannot map low DOS memory (the first 640k).
You can most likely avoid this problem by running
sysctl -w vm.mmap_min_addr=0
as root, or by changing the vm.mmap_min_addr setting in
/etc/sysctl.conf or a file in /etc/sysctl.d/ to 0.
Comment 13 Daniel Walsh 2010-09-28 16:23:23 EDT
Jeremy you are showing an error that will probably trigger an mmap_zero error not related to this bug.
Comment 14 Mike 2010-10-08 16:02:52 EDT
Got the same message while installing pollipo through packagekit.

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