Bug 1574156 - SELinux is preventing sh from 'execute_no_trans' accesses on the file /usr/bin/kmod.
Summary: SELinux is preventing sh from 'execute_no_trans' accesses on the file /usr/bi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 28
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:5a2262c4bc825534683fbd12d54...
: 1574157 1574158 1574159 1574160 1574168 1574176 1574180 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-02 18:14 UTC by Anass Ahmed
Modified: 2018-06-09 20:41 UTC (History)
6 users (show)

Fixed In Version: selinux-policy-3.14.2-22.fc29 selinux-policy-3.14.1-32.fc28
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-06-09 20:41:53 UTC
Type: ---


Attachments (Terms of Use)

Description Anass Ahmed 2018-05-02 18:14:35 UTC
Description of problem:
Trying to connect to SSH Tunnel using GNOME Network Manager SSH plugin.
SELinux is preventing sh from 'execute_no_trans' accesses on the file /usr/bin/kmod.

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

If you believe that sh should be allowed execute_no_trans access on the kmod 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:
# ausearch -c 'sh' --raw | audit2allow -M my-sh
# semodule -X 300 -i my-sh.pp

Additional Information:
Source Context                system_u:system_r:NetworkManager_ssh_t:s0
Target Context                system_u:object_r:insmod_exec_t:s0
Target Objects                /usr/bin/kmod [ file ]
Source                        sh
Source Path                   sh
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           kmod-25-2.fc28.x86_64
Policy RPM                    selinux-policy-3.14.1-21.fc28.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.16.3-300.fc28.x86_64 #1 SMP Thu
                              Apr 19 19:04:56 UTC 2018 x86_64 x86_64
Alert Count                   1
First Seen                    2018-04-26 01:40:57 EET
Last Seen                     2018-04-26 01:40:57 EET
Local ID                      076102d1-79e7-4127-af35-aedfa7594773

Raw Audit Messages
type=AVC msg=audit(1524699657.122:688): avc:  denied  { execute_no_trans } for  pid=28467 comm="sh" path="/usr/bin/kmod" dev="sda2" ino=2259018 scontext=system_u:system_r:NetworkManager_ssh_t:s0 tcontext=system_u:object_r:insmod_exec_t:s0 tclass=file permissive=0


Hash: sh,NetworkManager_ssh_t,insmod_exec_t,file,execute_no_trans

Version-Release number of selected component:
selinux-policy-3.14.1-21.fc28.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.5
hashmarkername: setroubleshoot
kernel:         4.16.5-300.fc28.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2018-05-25 22:17:22 UTC
*** Bug 1574157 has been marked as a duplicate of this bug. ***

Comment 2 Lukas Vrabec 2018-05-25 22:17:25 UTC
*** Bug 1574158 has been marked as a duplicate of this bug. ***

Comment 3 Lukas Vrabec 2018-05-25 22:17:30 UTC
*** Bug 1574159 has been marked as a duplicate of this bug. ***

Comment 4 Lukas Vrabec 2018-05-25 22:17:35 UTC
*** Bug 1574160 has been marked as a duplicate of this bug. ***

Comment 5 Lukas Vrabec 2018-05-25 22:17:43 UTC
*** Bug 1574168 has been marked as a duplicate of this bug. ***

Comment 6 Lukas Vrabec 2018-05-25 22:17:48 UTC
*** Bug 1574176 has been marked as a duplicate of this bug. ***

Comment 7 Lukas Vrabec 2018-05-25 22:17:54 UTC
*** Bug 1574180 has been marked as a duplicate of this bug. ***

Comment 8 Lukas Vrabec 2018-05-25 22:26:54 UTC
Hi Jiri, 

Could we collect here all SELinux denials related to blocking  connection to SSH Tunnel using GNOME Network Manager SSH plugin.

THanks,
Lukas.

Comment 9 Jiri Eischmann 2018-05-28 13:37:53 UTC
This is what I get while trying to use SSH Tunnel via NM:

Udělejte
prozatím tento přístup povolíte příkazy:
# ausearch -c 'nm-ssh-service' --raw | audit2allow -M my-nmsshservice
# semodule -X 300 -i my-nmsshservice.pp


Doplňující informace:
Kontext zdroje                system_u:system_r:NetworkManager_ssh_t:s0
Kontext cíle                  system_u:object_r:system_dbusd_var_run_t:s0
Objekty cíle                  system_bus_socket [ sock_file ]
Zdroj                         nm-ssh-service
Cesta zdroje                  nm-ssh-service
Port                          <Unknown>
Počítač                       xps13-jeischma
RPM balíčky zdroje            
RPM balíčky cíle              
RPM politiky                  selinux-policy-3.14.1-25.fc28.noarch
Selinux povolen               True
Typ politiky                  targeted
Vynucovací režim              Enforcing
Název počítače                xps13-jeischma
Platforma                     Linux xps13-jeischma 4.16.11-300.fc28.x86_64 #1
                              SMP Tue May 22 18:29:09 UTC 2018 x86_64 x86_64
Počet upozornění              1
Poprvé viděno                 2018-05-28 15:27:44 CEST
Naposledy viděno              2018-05-28 15:27:44 CEST
Místní ID                     0d16ad86-c3be-469a-a584-cf7c1d609d37

Původní zprávy auditu
type=AVC msg=audit(1527514064.334:416): avc:  denied  { write } for  pid=15028 comm="nm-ssh-service" name="system_bus_socket" dev="tmpfs" ino=27037 scontext=system_u:system_r:NetworkManager_ssh_t:s0 tcontext=system_u:object_r:system_dbusd_var_run_t:s0 tclass=sock_file permissive=0


Hash: nm-ssh-service,NetworkManager_ssh_t,system_dbusd_var_run_t,sock_file,write

I'm not sure I'm the right person to debug this. I have no previous experience with this plugin and neither me not anyone on my team maintains GNOME Network Manager.

Comment 10 Lukas Vrabec 2018-06-03 13:26:41 UTC
I fixed SELinux denials, from your report. Will close it for now. Feel free to re-open if you still have some troubles with networkdmanager_ssh_t

Comment 11 Fedora Update System 2018-06-06 13:36:13 UTC
selinux-policy-3.14.1-32.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-743a9247de

Comment 12 Fedora Update System 2018-06-07 13:16:46 UTC
selinux-policy-3.14.1-32.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-743a9247de

Comment 13 Fedora Update System 2018-06-09 20:41:53 UTC
selinux-policy-3.14.1-32.fc28 has been pushed to the Fedora 28 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.