Bug 708260 - SELinux is preventing /usr/sbin/pppd from 'read' accesses on the file LCK..ttyUSB3.
Summary: SELinux is preventing /usr/sbin/pppd from 'read' accesses on the file LCK..tt...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ppp
Version: 15
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jiri Skala
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:0f5cd23c752...
: 708315 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-27 03:55 UTC by Amit Shah
Modified: 2014-11-09 22:34 UTC (History)
7 users (show)

Fixed In Version: ppp-2.4.5-17.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-06-21 17:23:20 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Amit Shah 2011-05-27 03:55:10 UTC
SELinux is preventing /usr/sbin/pppd from 'read' accesses on the file LCK..ttyUSB3.

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

If you believe that pppd should be allowed read access on the LCK..ttyUSB3 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:pppd_t:s0
Target Context                system_u:object_r:var_lock_t:s0
Target Objects                LCK..ttyUSB3 [ file ]
Source                        pppd
Source Path                   /usr/sbin/pppd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           ppp-2.4.5-16.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.39-1.fc16.x86_64 #1
                              SMP Sat May 21 02:34:01 UTC 2011 x86_64 x86_64
Alert Count                   13
First Seen                    Thu 26 May 2011 07:11:40 PM IST
Last Seen                     Fri 27 May 2011 08:34:08 AM IST
Local ID                      fb50193d-ce3e-4162-a1a4-01dc3648135a

Raw Audit Messages
type=AVC msg=audit(1306465448.881:1476): avc:  denied  { read } for  pid=21535 comm="pppd" name="LCK..ttyUSB3" dev=tmpfs ino=640409 scontext=system_u:system_r:pppd_t:s0 tcontext=system_u:object_r:var_lock_t:s0 tclass=file


type=SYSCALL msg=audit(1306465448.881:1476): arch=x86_64 syscall=open success=no exit=EACCES a0=7f9546d90080 a1=80000 a2=0 a3=7fff6fec9190 items=0 ppid=814 pid=21535 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=pppd exe=/usr/sbin/pppd subj=system_u:system_r:pppd_t:s0 key=(null)

Hash: pppd,pppd_t,var_lock_t,file,read

audit2allow

#============= pppd_t ==============
allow pppd_t var_lock_t:file read;

audit2allow -R

#============= pppd_t ==============
allow pppd_t var_lock_t:file read;

Comment 1 Dominick Grift 2011-05-27 09:30:37 UTC
duplicate of: 707977

Comment 2 Miroslav Grepl 2011-05-27 10:18:26 UTC
*** Bug 708315 has been marked as a duplicate of this bug. ***

Comment 3 Miroslav Grepl 2011-05-27 10:33:07 UTC
F15 needs 

type pppd_lock_t;
files_lock_file(pppd_lock_t)

allow pppd_t pppd_lock_t:file manage_file_perms;
files_lock_filetrans(pppd_t, pppd_lock_t, file)

at least.

Comment 4 Dominick Grift 2011-05-27 10:41:06 UTC
Those rules seem to be already in the master branch. There is however no file context specification for pppd_lock_t files.

Comment 5 Miroslav Grepl 2011-05-27 16:37:33 UTC
# rpm -ql ppp |grep lock

returns nothing.

Jiri,
could you look at this?

/var/lock/ppp directory owned by ppp would be fine.

Comment 6 Jukka Palko 2011-05-30 05:21:10 UTC
Could my F15 x86_64 SELinux issue with pppd could be added to this. I am getting this with my Gobi 2000 3G:

$ sudo grep pppd /var/log/audit/audit.log
type=AVC msg=audit(1306678539.894:56): avc:  denied  { read } for  pid=1951 comm="pppd" name="lock" dev=dm-1 ino=2903 scontext=system_u:system_r:pppd_t:s0 tcontext=system_u:object_r:var_t:s0 tclass=lnk_file
type=SYSCALL msg=audit(1306678539.894:56): arch=c000003e syscall=2 success=no exit=-13 a0=7f2c7047a080 a1=800c2 a2=1a4 a3=7fffbfe29170 items=0 ppid=830 pid=1951 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="pppd" exe="/usr/sbin/pppd" subj=system_u:system_r:pppd_t:s0 key=(null)

Which translates to a module of
--snip--
module pppd 1.0;

require {
    type var_t;
    type pppd_t;
    class lnk_file read;
}

#============= pppd_t ==============
allow pppd_t var_t:lnk_file read;
--snip--

After adding that I was able to get my 3G working on my Thinkpad Edge. But if it's preferable that I put this into a new bug, I'll do that.

Comment 7 Dominick Grift 2011-05-30 08:23:29 UTC
(In reply to comment #6)
> Could my F15 x86_64 SELinux issue with pppd could be added to this. I am
> getting this with my Gobi 2000 3G:
> 
> $ sudo grep pppd /var/log/audit/audit.log
> type=AVC msg=audit(1306678539.894:56): avc:  denied  { read } for  pid=1951
> comm="pppd" name="lock" dev=dm-1 ino=2903 scontext=system_u:system_r:pppd_t:s0
> tcontext=system_u:object_r:var_t:s0 tclass=lnk_file
> type=SYSCALL msg=audit(1306678539.894:56): arch=c000003e syscall=2 success=no
> exit=-13 a0=7f2c7047a080 a1=800c2 a2=1a4 a3=7fffbfe29170 items=0 ppid=830
> pid=1951 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0
> fsgid=0 tty=(none) ses=4294967295 comm="pppd" exe="/usr/sbin/pppd"
> subj=system_u:system_r:pppd_t:s0 key=(null)
> 
> Which translates to a module of
> --snip--
> module pppd 1.0;
> 
> require {
>     type var_t;
>     type pppd_t;
>     class lnk_file read;
> }
> 
> #============= pppd_t ==============
> allow pppd_t var_t:lnk_file read;
> --snip--
> 
> After adding that I was able to get my 3G working on my Thinkpad Edge. But if
> it's preferable that I put this into a new bug, I'll do that.

This should be another issue which can be fixed by running : restorecon -R -v /var

the /var/lock symlink was mislabelled.

Seems like some quirk in restorecon where restorecon -R -v -F /var/lock will not affect the /var/lock symlink, where restorecon -R -v /var will.

Comment 8 Dominick Grift 2011-05-30 08:25:31 UTC
always prefix your local loadable modules. You almost overwritten the upstream ppp module.

restorecon -R -v /var
semodule -r pppd

Comment 9 Dominick Grift 2011-05-30 08:28:24 UTC
Actually i do suspect the initial issue is also due to the mislabelled /var/lock

Comment 10 Jukka Palko 2011-05-30 15:00:30 UTC
Thanks, running
# restorecon -R -v /var
fixed my problem.

Comment 11 Fedora Update System 2011-06-02 06:25:46 UTC
ppp-2.4.5-17.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/ppp-2.4.5-17.fc15

Comment 12 Fedora Update System 2011-06-03 05:31:42 UTC
Package ppp-2.4.5-17.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing ppp-2.4.5-17.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/ppp-2.4.5-17.fc15
then log in and leave karma (feedback).

Comment 13 Fedora Update System 2011-06-21 17:23:08 UTC
ppp-2.4.5-17.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.


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