Bug 1144504 - SELinux is preventing openvpn from 'open' accesses on the file /home/mikhail/Downloads/vpn/BRSC/BusinessEngineering_GavrilovMV.p12.
Summary: SELinux is preventing openvpn from 'open' accesses on the file /home/mikhail/...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 21
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:46b2b84a95888552442542dec77...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-19 15:02 UTC by Mikhail
Modified: 2015-04-20 08:37 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-13 13:43:44 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Mikhail 2014-09-19 15:02:20 UTC
Description of problem:
SELinux is preventing openvpn from 'open' accesses on the file /home/mikhail/Downloads/vpn/BRSC/BusinessEngineering_GavrilovMV.p12.

*****  Plugin openvpn (47.5 confidence) suggests   ***************************

If you want to mv BusinessEngineering_GavrilovMV.p12 to standard location so that openvpn can have open access
Then you must move the cert file to the ~/.cert directory
Do
# mv /home/mikhail/Downloads/vpn/BRSC/BusinessEngineering_GavrilovMV.p12 ~/.cert
# restorecon -R -v ~/.cert


*****  Plugin openvpn (47.5 confidence) suggests   ***************************

If you want to modify the label on BusinessEngineering_GavrilovMV.p12 so that openvpn can have open access on it
Then you must fix the labels.
Do
# semanage fcontext -a -t home_cert_t /home/mikhail/Downloads/vpn/BRSC/BusinessEngineering_GavrilovMV.p12
# restorecon -R -v /home/mikhail/Downloads/vpn/BRSC/BusinessEngineering_GavrilovMV.p12


*****  Plugin catchall (6.38 confidence) suggests   **************************

If you believe that openvpn should be allowed open access on the BusinessEngineering_GavrilovMV.p12 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 openvpn /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:openvpn_t:s0
Target Context                unconfined_u:object_r:user_home_t:s0
Target Objects                /home/mikhail/Downloads/vpn/BRSC/BusinessEngineeri
                              ng_GavrilovMV.p12 [ file ]
Source                        openvpn
Source Path                   openvpn
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-79.fc21.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.16.2-301.fc21.x86_64+debug #1
                              SMP Thu Sep 11 12:35:05 UTC 2014 x86_64 x86_64
Alert Count                   4
First Seen                    2014-09-19 21:00:53 YEKT
Last Seen                     2014-09-19 21:01:04 YEKT
Local ID                      bdb47163-e706-4e36-901f-a1983bb78442

Raw Audit Messages
type=AVC msg=audit(1411138864.607:514): avc:  denied  { open } for  pid=5210 comm="openvpn" path="/home/mikhail/Downloads/vpn/BRSC/BusinessEngineering_GavrilovMV.p12" dev="sdb1" ino=11137044 scontext=system_u:system_r:openvpn_t:s0 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1


Hash: openvpn,openvpn_t,user_home_t,file,open

Version-Release number of selected component:
selinux-policy-3.13.1-79.fc21.noarch

Additional info:
reporter:       libreport-2.2.3
hashmarkername: setroubleshoot
kernel:         3.16.2-301.fc21.x86_64+debug
type:           libreport

Potential duplicate: bug 849784

Comment 1 Mikhail 2014-10-04 06:59:36 UTC
Description of problem:
And again when was imported .ovpn configuration file nobody cares that for certificates must be changed SELinux attributes :'(

Version-Release number of selected component:
selinux-policy-3.13.1-84.fc21.noarch

Additional info:
reporter:       libreport-2.2.3
hashmarkername: setroubleshoot
kernel:         3.16.3-302.fc21.x86_64+debug
type:           libreport

Comment 2 Miroslav Grepl 2014-10-13 13:43:44 UTC
We dont't have a way how to fix it. It should be fixed by a tool to fix labeling. But you should take care about SELinux. You take care about DAC, you want to take care about MAC.

Comment 3 Mikhail 2014-10-13 13:49:37 UTC
(In reply to Miroslav Grepl from comment #2)
> We dont't have a way how to fix it. It should be fixed by a tool to fix
> labeling. But you should take care about SELinux. You take care about DAC,
> you want to take care about MAC.

I offered when imported ovpn file, mark certificates, but I am afraid this behavior will not accepted by NetworkManaget upstream :(

Comment 4 Miroslav Grepl 2014-10-13 14:30:22 UTC
AFAIK there is a request for this behaviour.

Comment 5 zcoalminer 2015-04-20 08:37:18 UTC
Description of problem:
connect to hma openvpn service through network manager

Version-Release number of selected component:
selinux-policy-3.13.1-105.11.fc21.noarch

Additional info:
reporter:       libreport-2.3.0
hashmarkername: setroubleshoot
kernel:         3.19.3-200.fc21.x86_64
type:           libreport


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