Bug 353601 - SELinux is preventing /sbin/pppoe (pppd_t) "write" to pppoe-adsl.pid.pppoe (var_run_t).
SELinux is preventing /sbin/pppoe (pppd_t) "write" to pppoe-adsl.pid.pppoe ...
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
i686 Linux
low Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2007-10-26 01:18 EDT by Tim McConnell
Modified: 2007-12-08 19:04 EST (History)
0 users

See Also:
Fixed In Version: selinux-policy-2.6.4-57.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-12-08 19:04:45 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Tim McConnell 2007-10-26 01:18:52 EDT
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-

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

How reproducible:

Steps to Reproduce:
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 #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 08:53:16 EDT
did you run the restorecon and did it fix the file context?

Where is this file located?
Comment 2 Tim McConnell 2007-10-26 21:00:40 EDT
(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
 it appears to have succeeded this time I will watch and see if the message
> Where is this file located?
It is located in:
locate pppoe-adsl.pid.pppoe
Comment 3 Daniel Walsh 2007-10-27 07:21:55 EDT
Fixed in selinux-policy-2.6.4-50
Comment 4 Tim McConnell 2007-10-27 11:43:29 EDT
(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:
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.