Bug 193652 - Poor error checking causes libselinux to send bogus mount requests to autofs
Poor error checking causes libselinux to send bogus mount requests to autofs
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: libselinux (Show other bugs)
5
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-05-31 09:06 EDT by Ian Kent
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version: Current
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-03-28 16:03:48 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)
Patch to check if selinux_mnt is NULL before attempting open call. (6.08 KB, patch)
2006-05-31 09:06 EDT, Ian Kent
no flags Details | Diff

  None (edit)
Description Ian Kent 2006-05-31 09:06:22 EDT
Description of problem:

libselinux uses the fail of an open call to establish presence
of configuration entries in selinuxfs.

If selinuxfs is not mounted then the variable selinux_mnt is
NULL causing an open of files like "(null)/mls". If the
current working directory is within an autofs managed filesystem
this causes a lookup of the key "(null)". This is can lead to
the bogus directory "(null)" being seen in the autofs filesystem
and can slow things down if using the auto.net script to mount
exports from a host. The showmount -e <host> can take some time
to return on bogus host names.

Version-Release number of selected component (if applicable):
libselinux-1.30-1.fc5

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Ian Kent 2006-05-31 09:06:22 EDT
Created attachment 130271 [details]
Patch to check if selinux_mnt is NULL before attempting open call.
Comment 2 Stephen Smalley 2006-06-02 08:52:52 EDT
Thanks, merged upstream.
Comment 3 Daniel Walsh 2006-06-06 15:05:35 EDT
Back ported to FC5

 	
libselinux-1.30.3-2.fc5

It is in testing please try it out.
Comment 4 Ian Kent 2006-06-07 09:00:38 EDT
(In reply to comment #3)
> Back ported to FC5
> 
>  	
> libselinux-1.30.3-2.fc5
> 
> It is in testing please try it out.

I haven't had a chance to test this on FC5 but I've been doing
some debuging on Rawhide the last couple of days and it doesn't
seem to happen. The version is 1.30.11-2. Is the correction
present in that version also?

Ian

Comment 5 Daniel Walsh 2006-06-07 11:19:48 EDT
yes.  From the changelog

* Thu Jun 1 2006 Dan Walsh <dwalsh@redhat.com> 1.30.12-1
- Upgrade to latest from NSA
	* Merged !selinux_mnt checks from Ian Kent.

* Thu Jun 1 2006 Dan Walsh <dwalsh@redhat.com> 1.30.11-2
- Check for selinux_mnt == NULL
Comment 6 Ian Kent 2006-06-08 07:34:09 EDT
(In reply to comment #3)
> Back ported to FC5
> 
>  	
> libselinux-1.30.3-2.fc5
> 
> It is in testing please try it out.

I tested this version and found the problem still present.
Further investigation showed that the specific test for NULL
of selinux_mnt in enable.c is not yet present in the package.

Ian


Comment 7 Daniel Walsh 2007-03-28 16:03:48 EDT
Closing bugs

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