Bug 623488

Summary: SELinux is preventing /usr/bin/webalizer access to a leaked /root file descriptor.
Product: [Fedora] Fedora Reporter: David <webmaster>
Component: cronieAssignee: Marcela Mašláňová <mmaslano>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 13CC: adrian1h, bfarndt, daryl.francis.thompson, didier.garde, dwalsh, erik.bartos, luigi.cardeles, mdeggers, mgrepl, mmaslano, pertusus, Robert-Martin, stickster, tmraz
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:4b84bb37e53eba9ff571d02cb9005baa6d63b0bffc87156261453f8cd9029ea2
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-08-13 18:48:45 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 David 2010-08-11 22:09:44 UTC
Summary:

SELinux is preventing /usr/bin/webalizer access to a leaked /root file
descriptor.

Detailed Description:

[webalizer has a permissive type (webalizer_t). This access was not denied.]

SELinux denied access requested by the webalizer command. It looks like this is
either a leaked descriptor or webalizer 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 /root. 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:webalizer_t:s0-s0:c0.c1023
Target Context                system_u:object_r:admin_home_t:s0
Target Objects                /root [ dir ]
Source                        webalizer
Source Path                   /usr/bin/webalizer
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           webalizer-2.21_02-3
Target RPM Packages           filesystem-2.4.31-1.fc13
Policy RPM                    selinux-policy-3.7.19-44.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   leaks
Host Name                     (removed)
Platform                      Linux (removed) 2.6.34.2-34.fc13.i686.PAE
                              #1 SMP Thu Aug 5 23:16:07 UTC 2010 i686 i686
Alert Count                   4
First Seen                    Sun 08 Aug 2010 03:31:01 AM EST
Last Seen                     Thu 12 Aug 2010 03:14:01 AM EST
Local ID                      156d9d39-519b-4c65-9715-e20cf085c1dd
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1281546841.461:39347): avc:  denied  { read } for  pid=2093 comm="webalizer" path="/root" dev=dm-0 ino=268 scontext=system_u:system_r:webalizer_t:s0-s0:c0.c1023 tcontext=system_u:object_r:admin_home_t:s0 tclass=dir

node=(removed) type=SYSCALL msg=audit(1281546841.461:39347): arch=40000003 syscall=11 success=yes exit=0 a0=85e1bb8 a1=85e3cf8 a2=85e3f60 a3=85e3cf8 items=0 ppid=2088 pid=2093 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=454 comm="webalizer" exe="/usr/bin/webalizer" subj=system_u:system_r:webalizer_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  leaks,webalizer,webalizer_t,admin_home_t,dir,read
audit2allow suggests:

#============= webalizer_t ==============
allow webalizer_t admin_home_t:dir read;

Comment 1 Miroslav Grepl 2010-08-12 11:54:18 UTC
Do you run webalizer from cron?

I will add

userdom_dontaudit_list_admin_dir(admin_home_t)

Comment 2 Daniel Walsh 2010-08-12 20:48:26 UTC
I think cronnie is leaking an open file descriptor to /root

We have seen the same AVC appear in prelink and webalizer, both tools run from cron.

Comment 3 Daniel Walsh 2010-08-13 18:48:45 UTC

*** This bug has been marked as a duplicate of bug 621842 ***