Bug 987686 - SELinux is preventing /usr/sbin/pppd from 'create' accesses on the file LCK..ttyUSB0.
SELinux is preventing /usr/sbin/pppd from 'create' accesses on the file LCK.....
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
18
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
abrt_hash:5fa4e78f4e46d2a016d7e84cc16...
:
: 987688 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-23 17:39 EDT by Patrik Greco
Modified: 2013-07-24 17:53 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-24 17:53:43 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)

  None (edit)
Description Patrik Greco 2013-07-23 17:39:59 EDT
Description of problem:
SELinux is preventing /usr/sbin/pppd from 'create' accesses on the file LCK..ttyUSB0.

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

If you believe that pppd should be allowed create access on the LCK..ttyUSB0 file 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 pppd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:NetworkManager_t:s0
Target Context                system_u:object_r:pppd_lock_t:s0
Target Objects                LCK..ttyUSB0 [ file ]
Source                        pppd
Source Path                   /usr/sbin/pppd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           ppp-2.4.5-30.fc18.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-97.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.9.10-200.fc18.x86_64 #1 SMP Sun
                              Jul 14 01:36:53 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-07-23 23:35:40 CEST
Last Seen                     2013-07-23 23:35:40 CEST
Local ID                      ea29a0e3-aa55-459b-8dd0-40954eaedc68

Raw Audit Messages
type=AVC msg=audit(1374615340.735:1084): avc:  denied  { create } for  pid=3942 comm="pppd" name="LCK..ttyUSB0" scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:pppd_lock_t:s0 tclass=file


type=SYSCALL msg=audit(1374615340.735:1084): arch=x86_64 syscall=open success=no exit=EACCES a0=7f3b16071260 a1=800c2 a2=1a4 a3=fffffff0 items=0 ppid=1064 pid=3942 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=pppd exe=/usr/sbin/pppd subj=system_u:system_r:NetworkManager_t:s0 key=(null)

Hash: pppd,NetworkManager_t,pppd_lock_t,file,create

audit2allow

#============= NetworkManager_t ==============
allow NetworkManager_t pppd_lock_t:file create;

audit2allow -R
require {
	type NetworkManager_t;
	type pppd_lock_t;
	class file create;
}

#============= NetworkManager_t ==============
allow NetworkManager_t pppd_lock_t:file create;


Additional info:
reporter:       libreport-2.1.5
hashmarkername: setroubleshoot
kernel:         3.9.10-200.fc18.x86_64
type:           libreport
Comment 1 Miroslav Grepl 2013-07-24 06:25:50 EDT
How is pppd labeled?

# ls -Z `which pppd`
Comment 2 Miroslav Grepl 2013-07-24 06:25:59 EDT
*** Bug 987688 has been marked as a duplicate of this bug. ***
Comment 3 Patrik Greco 2013-07-24 06:28:56 EDT
(In reply to Miroslav Grepl from comment #1)
> How is pppd labeled?
> 
> # ls -Z `which pppd`

# ls -Z `which pppd`
-r-xr-xr-x. root root unconfined_u:object_r:bin_t:s0   /usr/sbin/pppd
Comment 4 Miroslav Grepl 2013-07-24 08:45:46 EDT
Patrik,
could you try to reinstall the policy and see if something blows up? Also what does

# matchpathcon /usr/sbin/pppd
Comment 5 Patrik Greco 2013-07-24 14:03:45 EDT
(In reply to Miroslav Grepl from comment #4)
> Patrik,
> could you try to reinstall the policy and see if something blows up? Also
> what does
> 
> # matchpathcon /usr/sbin/pppd

I'm not quite sure what you want me to do, but I did a yum reinstall on selinux-policy, even tho I believe that you wanted me to do something else.

For the seccond part:
# matchpathcon /usr/sbin/pppd
/usr/sbin/pppd	system_u:object_r:pppd_exec_t:s0
Comment 6 Daniel Walsh 2013-07-24 17:13:31 EDT
Seems like your machine is mislabeled.

fixfiles restore

Should fix the labels.
Comment 7 Patrik Greco 2013-07-24 17:53:43 EDT
(In reply to Daniel Walsh from comment #6)
> Seems like your machine is mislabeled.
> 
> fixfiles restore
> 
> Should fix the labels.

Ah, that solved it. Thanks.

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