Bug 904375 - SELinux is preventing /usr/sbin/xl2tpd from 'read' accesses on the file nm-xl2tpd.conf.1882.
Summary: SELinux is preventing /usr/sbin/xl2tpd from 'read' accesses on the file nm-xl...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 18
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:45405fbd9fb5f4f939a88c660e1...
: 907012 907013 907015 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-26 13:52 UTC by Фукидид
Modified: 2013-03-07 10:09 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-07 10:09:46 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
# ausearch -m avc -su l2tpd_t (1.80 KB, application/octet-stream)
2013-02-04 11:54 UTC, Фукидид
no flags Details

Description Фукидид 2013-01-26 13:52:11 UTC
Description of problem:
Пытался подключится к интернету при помощи NetworkManager-l2tp.

Additional info:
hashmarkername: setroubleshoot
kernel:         3.7.2-204.fc18.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2013-01-28 11:01:01 UTC
Could you also attach AVC msg which you are getting? Did you submit it with this report?

Comment 2 Фукидид 2013-01-28 11:45:48 UTC
SELinux is preventing /usr/sbin/xl2tpd from read access on the file nm-xl2tpd.conf.2172.

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

If вы считаете, что xl2tpd следует разрешить доступ read к nm-xl2tpd.conf.2172 file по умолчанию.
Then рекомендуется создать отчет об ошибке.
Чтобы разрешить доступ, можно создать локальный модуль политики.
Do
чтобы разрешить доступ, выполните:
# grep xl2tpd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:l2tpd_t:s0
Target Context                system_u:object_r:NetworkManager_var_run_t:s0
Target Objects                nm-xl2tpd.conf.2172 [ file ]
Source                        xl2tpd
Source Path                   /usr/sbin/xl2tpd
Port                          <Unknown>
Host                          localhost.localdomain
Source RPM Packages           xl2tpd-1.3.1-10.fc18.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-73.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     localhost.localdomain
Platform                      Linux localhost.localdomain 3.7.4-204.fc18.x86_64
                              #1 SMP Wed Jan 23 16:44:29 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-01-28 14:42:06 FET
Last Seen                     2013-01-28 14:42:06 FET
Local ID                      31718065-e191-45c9-bacc-4b9e64c704e2

Raw Audit Messages
type=AVC msg=audit(1359373326.439:335): avc:  denied  { read } for  pid=2189 comm="xl2tpd" name="nm-xl2tpd.conf.2172" dev="tmpfs" ino=101873 scontext=system_u:system_r:l2tpd_t:s0 tcontext=system_u:object_r:NetworkManager_var_run_t:s0 tclass=file


type=SYSCALL msg=audit(1359373326.439:335): arch=x86_64 syscall=open success=no exit=EACCES a0=61e028 a1=0 a2=1b6 a3=238 items=0 ppid=2172 pid=2189 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=xl2tpd exe=/usr/sbin/xl2tpd subj=system_u:system_r:l2tpd_t:s0 key=(null)

Hash: xl2tpd,l2tpd_t,NetworkManager_var_run_t,file,read

audit2allow

#============= l2tpd_t ==============
allow l2tpd_t NetworkManager_var_run_t:file read;

audit2allow -R

#============= l2tpd_t ==============
allow l2tpd_t NetworkManager_var_run_t:file read;

Comment 3 Daniel Walsh 2013-01-28 15:53:09 UTC
Looks like there is a pretty good connection between the apps.

Comment 4 Daniel Walsh 2013-01-28 16:12:09 UTC
Fixed in git.

Comment 5 Miroslav Grepl 2013-01-28 17:18:25 UTC
Backported.

Comment 6 Fedora Update System 2013-01-31 13:19:12 UTC
selinux-policy-3.11.1-74.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-74.fc18

Comment 7 Fedora Update System 2013-02-01 16:39:55 UTC
Package selinux-policy-3.11.1-74.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.11.1-74.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-1693/selinux-policy-3.11.1-74.fc18
then log in and leave karma (feedback).

Comment 8 Фукидид 2013-02-01 17:19:27 UTC
Не получается.

# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.11.1-74.fc18'
Загружены модули: langpacks, presto
Совпадений с selinux-policy-3.11.1-74.fc18 не найдено.
Пакета с названием selinux-policy-3.11.1-74.fc18 не найдено.
Пакетов, отмеченных для обновления, нет.

Comment 9 Фукидид 2013-02-02 16:48:23 UTC
Установил selinux-policy-3.11.1-74.fc18, но не работает.

1) SELinux is preventing /usr/libexec/nm-l2tp-service from name_bind access on the udp_socket .
2) SELinux is preventing /usr/sbin/pppd from read access on the file nm-ppp-options.xl2tpd.6974.
3) SELinux is preventing /usr/libexec/nm-l2tp-service from using the signal access on a process.
4) SELinux is preventing /usr/libexec/nm-l2tp-service from using the sigkill access on a process.

Comment 10 Miroslav Grepl 2013-02-04 11:07:24 UTC
*** Bug 907012 has been marked as a duplicate of this bug. ***

Comment 11 Miroslav Grepl 2013-02-04 11:07:29 UTC
*** Bug 907013 has been marked as a duplicate of this bug. ***

Comment 12 Miroslav Grepl 2013-02-04 11:07:34 UTC
*** Bug 907015 has been marked as a duplicate of this bug. ***

Comment 13 Miroslav Grepl 2013-02-04 11:16:41 UTC
Could you also attach AVC msgs?

ausearch -m avc -su l2tpd_t

Comment 14 Miroslav Grepl 2013-02-04 11:18:26 UTC
Also I added some fixes.

commit 4c752571162cc4cb26063ff4ee0bae4a6a66b509
Author: Miroslav Grepl <mgrepl>
Date:   Mon Feb 4 12:16:39 2013 +0100

    Allow l2tpd_t to all signal perms

Comment 15 Фукидид 2013-02-04 11:54:09 UTC
Created attachment 692689 [details]
# ausearch -m avc -su l2tpd_t

Comment 16 Fedora Update System 2013-02-08 02:24:39 UTC
selinux-policy-3.11.1-74.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 17 Фукидид 2013-03-06 17:26:03 UTC
Проблема повторилась. Установлен selinux-policy-3.11.1-82.fc18.

Comment 18 Фукидид 2013-03-06 17:27:05 UTC
Пытался использовать NetworkManager-l2tp.

Package: (null)
OS Release: Fedora release 18 (Spherical Cow)

Comment 19 Miroslav Grepl 2013-03-07 10:09:46 UTC
#============= l2tpd_t ==============
#!!!! This avc is allowed in the current policy

allow l2tpd_t NetworkManager_var_run_t:file read;


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