Bug 707977

Summary: SELinux is preventing /usr/bin/python from 'relabelto' accesses on the directory lock.
Product: [Fedora] Fedora Reporter: Ankur Sinha (FranciscoD) <sanjay.ankur>
Component: pppAssignee: Michal Sekletar <msekleta>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 15CC: dominick.grift, dwalsh, jskala, mgrepl, sanjay.ankur
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:9732ace44cbf3643d6941e0bbc5b41a618392c59b6ba198e3f1529f4ffd4a395
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-07 19:22:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
policy generated using sealert troubleshooter none

Description Ankur Sinha (FranciscoD) 2011-05-26 13:26:05 UTC
SELinux is preventing /usr/bin/python from 'relabelto' accesses on the directory lock.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that python should be allowed relabelto access on the lock directory by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep yum /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:system_r:rpm_t:s0-s0:c0.c1023
Target Context                system_u:object_r:pppd_t:s0
Target Objects                lock [ dir ]
Source                        yum
Source Path                   /usr/bin/python
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           python-2.7.1-7.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-24.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.38.6-27.fc15.x86_64 #1 SMP Sun
                              May 15 17:23:28 UTC 2011 x86_64 x86_64
Alert Count                   1
First Seen                    Thu 26 May 2011 18:02:58 IST
Last Seen                     Thu 26 May 2011 18:02:58 IST
Local ID                      b2eaf7ac-5931-480f-b31b-c6d8b3b165f9

Raw Audit Messages
type=AVC msg=audit(1306413178.49:890): avc:  denied  { relabelto } for  pid=18107 comm="yum" name="lock" dev=tmpfs ino=6247 scontext=unconfined_u:system_r:rpm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:pppd_t:s0 tclass=dir


type=SYSCALL msg=audit(1306413178.49:890): arch=x86_64 syscall=lsetxattr success=no exit=EACCES a0=1de0380 a1=3b3de15d8b a2=9ec2ef0 a3=1c items=0 ppid=21726 pid=18107 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts6 ses=1 comm=yum exe=/usr/bin/python subj=unconfined_u:system_r:rpm_t:s0-s0:c0.c1023 key=(null)

Hash: yum,rpm_t,pppd_t,dir,relabelto

audit2allow

#============= rpm_t ==============
allow rpm_t pppd_t:dir relabelto;

audit2allow -R

#============= rpm_t ==============
allow rpm_t pppd_t:dir relabelto;

Comment 1 Dominick Grift 2011-05-26 13:36:02 UTC
This look to me like a bug in the ppp package to me. It shouldnt be trying to relabel this directory to pppd_t (pppd_t is a domain type and not a file type) but instead probably ppd_lock_t if anything at all.

Comment 2 Dominick Grift 2011-05-26 13:47:42 UTC
We need to add a file context specification for pppd_t's lock files, currently it doesnt have any. What is the full path to pppd_t's lock files?

Comment 3 Daniel Walsh 2011-05-26 13:58:57 UTC
Ankur Sinha  Did you chcon -t pppd_t  a lock file?

Comment 4 Daniel Walsh 2011-05-26 19:43:58 UTC
*** Bug 708048 has been marked as a duplicate of this bug. ***

Comment 5 Ankur Sinha (FranciscoD) 2011-06-09 04:36:31 UTC
Hey Daniel,

I tried to use my USB Mobile thing for the net and sealert gave me some errors. I used the troubleshooter to generate a policy and apply it, like it said. I didn't use chcon on my own. 

Thanks,
Ankur

Comment 6 Miroslav Grepl 2011-06-09 07:46:31 UTC
Which errors did you get? How does your local policy look?

Comment 7 Ankur Sinha (FranciscoD) 2011-06-09 12:35:34 UTC
Hi Miroslav, 

I didn't get any errors. The mobile broadband thing on network manager wouldn't connect. It stayed in the connecting state and sealert would pop up. I had to generate two new policies. I only have one of them saved. (mypol.pp keeps getting overwritten, so the second one's lost. Sorry)

I'm attaching the one policy I have saved. 

Thanks,
Ankur

Comment 8 Ankur Sinha (FranciscoD) 2011-06-09 12:36:06 UTC
Created attachment 503881 [details]
policy generated using sealert troubleshooter

Comment 9 Daniel Walsh 2011-06-09 18:27:17 UTC
There is a problem that pppd_t should never  be a label on disk.  It is a process label.

Comment 10 Fedora Admin XMLRPC Client 2011-08-08 08:11:02 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 11 Fedora End Of Life 2012-08-07 19:22:12 UTC
This message is a notice that Fedora 15 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 15. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 15 reached 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, you are encouraged to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.

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