Bug 647981 - SELinux is preventing /usr/bin/perl access to a leaked /tmp/.NSPR-AFM-1561-7feb1aadcc80.0 (deleted) file descriptor.
Summary: SELinux is preventing /usr/bin/perl access to a leaked /tmp/.NSPR-AFM-1561-7f...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 13
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:d8322ed61d1...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-10-30 09:22 UTC by Roman Melihhov
Modified: 2011-05-31 07:49 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-31 07:49:20 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Roman Melihhov 2010-10-30 09:22:30 UTC
Summary:

SELinux is preventing /usr/bin/perl access to a leaked
/tmp/.NSPR-AFM-1561-7feb1aadcc80.0 (deleted) file descriptor.

Detailed Description:

[banring has a permissive type (httpd_user_script_t). This access was not
denied.]

SELinux denied access requested by the banring command. It looks like this is
either a leaked descriptor or banring 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/.NSPR-AFM-1561-7feb1aadcc80.0 (deleted). 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:httpd_user_script_t:s0
Target Context                system_u:object_r:httpd_tmp_t:s0
Target Objects                /tmp/.NSPR-AFM-1561-7feb1aadcc80.0 (deleted) [
                              file ]
Source                        banring
Source Path                   /usr/bin/perl
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           perl-5.10.1-120.fc13
Target RPM Packages           
Policy RPM                    selinux-policy-3.7.19-65.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   leaks
Host Name                     (removed)
Platform                      Linux (removed) 2.6.34.7-61.fc13.x86_64 #1 SMP
                              Tue Oct 19 04:06:30 UTC 2010 x86_64 x86_64
Alert Count                   1
First Seen                    Sat 30 Oct 2010 12:20:19 PM EEST
Last Seen                     Sat 30 Oct 2010 12:20:19 PM EEST
Local ID                      229174d5-4410-4531-b1d3-10946272984a
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1288430419.441:27794): avc:  denied  { read write } for  pid=7462 comm="banring" path=2F746D702F2E4E5350522D41464D2D313536312D3766656231616164636338302E30202864656C6574656429 dev=sda2 ino=13942 scontext=system_u:system_r:httpd_user_script_t:s0 tcontext=system_u:object_r:httpd_tmp_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1288430419.441:27794): arch=c000003e syscall=59 success=yes exit=0 a0=7feb1acf9ed8 a1=7feb1acf5c80 a2=7feb1acf5c98 a3=7feb092547a0 items=0 ppid=5527 pid=7462 auid=4294967295 uid=48 gid=484 euid=48 suid=48 fsuid=48 egid=484 sgid=484 fsgid=484 tty=(none) ses=4294967295 comm="banring" exe="/usr/bin/perl" subj=system_u:system_r:httpd_user_script_t:s0 key=(null)



Hash String generated from  leaks,banring,httpd_user_script_t,httpd_tmp_t,file,read,write
audit2allow suggests:

#============= httpd_user_script_t ==============
allow httpd_user_script_t httpd_tmp_t:file { read write };

Comment 1 Roman Melihhov 2010-10-30 10:00:06 UTC
all banring cgi-bin script does is sending two lines of text

print "Content-type: text/html\n\n";
print "<big>BBN has been discontinued.</big>\n";

this is all...

Comment 2 Daniel Walsh 2010-11-01 13:03:49 UTC
This is just showing a leak from apache modeules into apache cgi's.

You can dontaudit these for now.

# grep httpd_user /var/log/audit/audit.log | audit2allow -D -M myhttp
# semodule -i myhttp.pp

Will make them dissapear.

Comment 3 Daniel Walsh 2010-11-01 13:07:16 UTC
Miroslav add

	apache_dontaudit_leaks(httpd_$1_script_t)

To apache_content_template and

	dontaudit $1 httpd_tmp_t:file { read write };


to apache_dontaudit_leaks.

Comment 4 Miroslav Grepl 2010-11-02 15:57:39 UTC
Fixed in selinux-policy-3.7.19-70.fc13

Comment 5 Fedora Admin XMLRPC Client 2010-11-08 21:50:31 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 6 Fedora Admin XMLRPC Client 2010-11-08 21:51:55 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 7 Fedora Admin XMLRPC Client 2010-11-08 21:54:59 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 8 Bug Zapper 2011-05-30 14:32:16 UTC
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  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 '13'.

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 13'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 13 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: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping


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