Bug 353601 - SELinux is preventing /sbin/pppoe (pppd_t) "write" to pppoe-adsl.pid.pppoe (var_run_t).
Summary: SELinux is preventing /sbin/pppoe (pppd_t) "write" to pppoe-adsl.pid.pppoe ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 7
Hardware: i686
OS: Linux
low
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-10-26 05:18 UTC by Tim McConnell
Modified: 2007-12-09 00:04 UTC (History)
0 users

Fixed In Version: selinux-policy-2.6.4-57.fc7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-12-09 00:04:45 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Tim McConnell 2007-10-26 05:18:52 UTC
Description of problem:
 SELinux is preventing /sbin/pppoe (pppd_t) "write" to pppoe-adsl.pid.pppoe
    (var_run_t). The SELinux type %TARGET_TYPE, is a generic type for all files
    in the directory and very few processes (SELinux Domains) are allowed to
    write to this SELinux type.  This type of denial usual indicates a
    mislabeled file.  By default a file created in a directory has the gets the
    context of the parent directory, but SELinux policy has rules about the
    creation of directories, that say if a process running in one SELinux Domain
    (D1) creates a file in a directory with a particular SELinux File Context
    (F1) the file gets a different File Context (F2).  The policy usually allows
    the SELinux Domain (D1) the ability to write or append on (F2).  But if for
    some reason a file (pppoe-adsl.pid.pppoe) was created with the wrong
    context, this domain will be denied.  The usual solution to this problem is
    to reset the file context on the target file, restorecon -v pppoe-
    adsl.pid.pppoe.  If the file context does not change from var_run_t, then
    this is probably a bug in policy.  Please file a
    http://bugzilla.redhat.com/bugzilla/enter_bug.cgi against the selinux-policy
    package. If it does change, you can try your application again to see if it
    works.  The file context could have been mislabeled by editing the file or
    moving the file from a different directory, if the file keeps getting
    mislabeled, check the init scripts to see if they are doing something to
    mislabel the file.

Allowing Access
    You can attempt to fix file context by executing restorecon -v pppoe-
    adsl.pid.pppoe

    The following command will allow this access:
    restorecon pppoe-adsl.pid.pppoe
Version-Release number of selected component (if applicable):
selinux-policy-2.6.4-48.fc7

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:
Shows up in SE Troubleshooter

Expected results:
Not to appear in SE Troubleshooter 

Additional info:
Source Context                system_u:system_r:pppd_t
Target Context                system_u:object_r:var_run_t
Target Objects                pppoe-adsl.pid.pppoe [ file ]
Affected RPM Packages         rp-pppoe-3.8-1.fc7 [application]
Policy RPM                    selinux-policy-2.6.4-48.fc7
Selinux Enabled               True
Policy Type                   targeted
MLS Enabled                   True
Enforcing Mode                Enforcing
Plugin Name                   plugins.mislabeled_file
Host Name                     timmieland.private
Platform                      Linux timmieland.private 2.6.22.9-91.fc7 #1 SMP
                              Thu Sep 27 23:10:59 EDT 2007 i686 athlon
Alert Count                   13
First Seen                    Tue 16 Oct 2007 03:21:21 AM MDT
Last Seen                     Tue 16 Oct 2007 03:24:32 AM MDT
Local ID                      8495f8ab-5f23-4e7c-8398-03a7d5d52775
Line Numbers                  

Raw Audit Messages            

avc: denied { write } for comm="pppoe" dev=dm-0 egid=0 euid=0 exe="/sbin/pppoe"
exit=-13 fsgid=0 fsuid=0 gid=0 items=0 name="pppoe-adsl.pid.pppoe" pid=7516
scontext=system_u:system_r:pppd_t:s0 sgid=0 subj=system_u:system_r:pppd_t:s0
suid=0 tclass=file tcontext=system_u:object_r:var_run_t:s0 tty=(none) uid=0

Comment 1 Daniel Walsh 2007-10-26 12:53:16 UTC
did you run the restorecon and did it fix the file context?

Where is this file located?

Comment 2 Tim McConnell 2007-10-27 01:00:40 UTC
(In reply to comment #1)
> did you run the restorecon and did it fix the file context?
Yes I ran restorecon and it gave an error, I ran: 
restorecon -R -v /var/run/pppoe-adsl.pid.pppoe
restorecon reset /var/run/pppoe-adsl.pid.pppoe context
system_u:object_r:pppd_var_run_t:s0->system_u:object_r:var_run_t:s0
 it appears to have succeeded this time I will watch and see if the message
reappears. 
> Where is this file located?
It is located in:
locate pppoe-adsl.pid.pppoe
/var/run/pppoe-adsl.pid.pppoe
 


Comment 3 Daniel Walsh 2007-10-27 11:21:55 UTC
Fixed in selinux-policy-2.6.4-50

Comment 4 Tim McConnell 2007-10-27 15:43:29 UTC
(In reply to comment #3)
> Fixed in selinux-policy-2.6.4-50

Great when is that available for updates? If I run rpm -qa selinux-policy I get:
selinux-policy-2.6.4-48.fc7
If I open yumex and filter for SELinux-policy I get:  
selinuux-policy-devel noarch 2.6.4-48.fc7
selinuux-policy-mls   noarch 2.6.4-48.fc7
selinuux-policy-strict noarch 2.6.4-48.fc7




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