Bug 1813096
Summary: | SELinux is preventing nm-ssh-service from 'read' accesses on the sock_file ssh. | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jeff MacDonald <jam> |
Component: | selinux-policy | Assignee: | Patrik Koncity <pkoncity> |
Status: | CLOSED DUPLICATE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 31 | CC: | dwalsh, grepl.miroslav, lvrabec, plautrba, vmojzis, zpytela |
Target Milestone: | --- | Keywords: | Triaged |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Unspecified | ||
Whiteboard: | abrt_hash:3189dd06a8d87a748a799cd585240a6dad9b8c431cda9a88a603cf5b6ea4189e;VARIANT_ID=workstation; | ||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-06-26 15:42:41 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Jeff MacDonald
2020-03-12 23:18:47 UTC
Hi Jeff, We still work on this pull request and it's not completely finished, but we made some progress on this issue, so you can try, what we investigated. Please create file mynetworkmanager.te where you copy this: $cat mynetworkmanager.te policy_module(mynetworkmanager, 1.0) require { type NetworkManager_ssh_t; } #=============NetworkManager_ssh_t============== userdom_rw_user_tmp_sock_files(NetworkManager_ssh_t) you have to install selinux-policy-devel if don't have it installed on your system then you compile this file, please use in dir where you have mynetworkmanager.te $make -f /usr/share/selinux/devel/Makefile mynetworkmanager.pp and finally load module to kernel, please use #semodule -i mynetworkmanager.pp it should work now for you. Or you have still AVC's related with NetworkManager_ssh_t? Thanks, Patrik SELinux is preventing sh from read access on the file /usr/sbin/ifconfig. Plugin: catchall SELinux denied access requested by sh. It is not expected that this access is required by sh and this access may signal an intrusion attempt. It is also possible that the specific version or configuration of the application is causing it to require additional access. If you believe that sh should be allowed read access on the ifconfig file by default. You should report this as a bug. You can generate a local policy module to allow this access. Allow this access for now by executing: # ausearch -c 'sh' --raw | audit2allow -M my-sh # semodule -X 300 -i my-sh.pp when I apply the above, I still get a connection failed, but no additional AVCs. SELinux is preventing sh from 'read, open' accesses on the file /usr/sbin/ifconfig. ***** Plugin catchall (100. confidence) suggests ************************** If you believe that sh should be allowed read open access on the ifconfig 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:ifconfig_exec_t:s0 Target Objects /usr/sbin/ifconfig [ file ] Source sh Source Path sh Port <Unknown> Host cyclops.zoidtechnologies.com Source RPM Packages Target RPM Packages net-tools-2.0-0.55.20160912git.fc31.x86_64 SELinux Policy RPM selinux-policy-targeted-3.14.4-50.fc31.noarch Local Policy RPM Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name cyclops.zoidtechnologies.com Platform Linux cyclops.zoidtechnologies.com 5.6.7-200.fc31.x86_64 #1 SMP Thu Apr 23 14:22:57 UTC 2020 x86_64 x86_64 Alert Count 3 First Seen 2020-04-20 22:40:41 EDT Last Seen 2020-05-10 15:40:27 EDT Local ID 0cd7dc16-1c2e-45d3-9175-d20054bf3f9d Raw Audit Messages type=AVC msg=audit(1589139627.93:5071): avc: denied { read open } for pid=1736187 comm="sh" path="/usr/sbin/ifconfig" dev="dm-0" ino=3417430 scontext=system_u:system_r:NetworkManager_ssh_t:s0 tcontext=system_u:object_r:ifconfig_exec_t:s0 tclass=file permissive=0 Hash: sh,NetworkManager_ssh_t,ifconfig_exec_t,file,read,open SELinux is preventing sh from read access on the file /usr/sbin/ifconfig. ***** Plugin catchall (100. confidence) suggests ************************** If you believe that sh should be allowed read access on the ifconfig 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:ifconfig_exec_t:s0 Target Objects /usr/sbin/ifconfig [ file ] Source sh Source Path sh Port <Unknown> Host (removed) Source RPM Packages Target RPM Packages net-tools-2.0-0.55.20160912git.fc31.x86_64 SELinux Policy RPM selinux-policy-targeted-3.14.4-50.fc31.noarch Local Policy RPM Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux cyclops.zoidtechnologies.com 5.6.7-200.fc31.x86_64 #1 SMP Thu Apr 23 14:22:57 UTC 2020 x86_64 x86_64 Alert Count 3 First Seen 2020-05-10 15:40:27 EDT Last Seen 2020-05-10 15:40:27 EDT Local ID 1eccc576-16c4-45db-9ef0-957b98a10fda Raw Audit Messages type=AVC msg=audit(1589139627.93:5074): avc: denied { read } for pid=1736187 comm="sh" name="ifconfig" dev="dm-0" ino=3417430 scontext=system_u:system_r:NetworkManager_ssh_t:s0 tcontext=system_u:object_r:ifconfig_exec_t:s0 tclass=file permissive=0 Hash: sh,NetworkManager_ssh_t,ifconfig_exec_t,file,read Hi Jeff, try to update selinux policy via: #dnf update selinux-policy Problem it can be solved in new version of policy. Regards, Patrik *** This bug has been marked as a duplicate of bug 1761071 *** |