Bug 609718 - SELinux is preventing /usr/sbin/NetworkManager "execute" access on /usr/libexec/nm-openswan-service.
SELinux is preventing /usr/sbin/NetworkManager "execute" access on /usr/...
Status: CLOSED DUPLICATE of bug 602973
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy (Show other bugs)
6.0
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Daniel Walsh
Milos Malik
setroubleshoot_trace_hash:a941b1a0e55...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-30 17:43 EDT by Matěj Cepl
Modified: 2012-10-15 10:02 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-07-01 10:41:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Matěj Cepl 2010-06-30 17:43:59 EDT
Happened both and without mgrepl's myopenswan module
Souhrn:

SELinux is preventing /usr/sbin/NetworkManager "execute" access on
/usr/libexec/nm-openswan-service.

Podrobný popis:

SELinux denied access requested by NetworkManager. It is not expected that this
access is required by NetworkManager 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.

Povolení přístupu:

You can generate a local policy module to allow this access - see FAQ
(http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385) Please file a bug
report.

Další informace:

Kontext zdroje                staff_u:system_r:NetworkManager_t:s0
Kontext cíle                 system_u:object_r:ipsec_mgmt_exec_t:s0
Objekty cíle                 /usr/libexec/nm-openswan-service [ file ]
Zdroj                         NetworkManager
Cesta zdroje                  /usr/sbin/NetworkManager
Port                          <Neznámé>
Počítač                    (removed)
RPM balíčky zdroje          NetworkManager-0.8.1-2.el6
RPM balíčky cíle           NetworkManager-openswan-0.8.0-1.20100411git.el6
RPM politiky                  selinux-policy-3.7.19-28.el6
Selinux povolen               True
Typ politiky                  targeted
Vynucovací režim            Enforcing
Název zásuvného modulu     catchall
Název počítače            (removed)
Platforma                     Linux (removed) 2.6.32-37.el6.x86_64 #1
                              SMP Sun Jun 20 19:29:35 EDT 2010 x86_64 x86_64
Počet upozornění           1
Poprvé viděno               St 30. červen 2010, 23:43:01 CEST
Naposledy viděno             St 30. červen 2010, 23:43:01 CEST
Místní ID                   dbffdd57-09bf-4f98-a42a-ad615598a664
Čísla řádků              

Původní zprávy auditu      

node=(removed) type=AVC msg=audit(1277934181.934:52): avc:  denied  { execute } for  pid=3351 comm="NetworkManager" name="nm-openswan-service" dev=dm-1 ino=525746 scontext=staff_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:ipsec_mgmt_exec_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1277934181.934:52): arch=c000003e syscall=59 success=no exit=-13 a0=1deb8c0 a1=7fff5397e940 a2=1dc1a00 a3=7fff5397e400 items=0 ppid=3214 pid=3351 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=1 comm="NetworkManager" exe="/usr/sbin/NetworkManager" subj=staff_u:system_r:NetworkManager_t:s0 key=(null)



Hash String generated from  catchall,NetworkManager,NetworkManager_t,ipsec_mgmt_exec_t,file,execute
audit2allow suggests:

#============= NetworkManager_t ==============
allow NetworkManager_t ipsec_mgmt_exec_t:file execute;
Comment 1 Matěj Cepl 2010-06-30 17:45:51 EDT
audit2allow has this to say:

johanka:~# ausearch -m AVC -ts recent|audit2allow


#============= NetworkManager_t ==============
allow NetworkManager_t ipsec_mgmt_exec_t:file execute;

#============= initrc_t ==============
#!!!! This avc is a constraint violation.  You will need to add an attribute to either the source or target type to make it work.
#Contraint rule: 
allow initrc_t net_conf_t:file create;
#!!!! The source type 'initrc_t' can write to a 'dir' of the following types:
# initrc_state_t, tmpfs_t, postgresql_db_t, alsa_etc_rw_t, gconf_etc_t, var_spool_t, var_lib_t, var_run_t, cgroupfs_t, xserver_log_t, virt_cache_t, dhcpc_state_t, squid_log_t, svc_svc_t, var_log_t, ipsec_var_run_t, pam_var_run_t, rpm_var_lib_t, net_conf_t, quota_flag_t, var_lib_nfs_t, etc_runtime_t, mysqld_db_t, udev_var_run_t, initrc_tmp_t, pam_var_console_t, cgroup_t, boot_t, cert_t, mnt_t, root_t, named_conf_t, tmp_t, system_dbusd_var_lib_t, var_t, lockfile, pidfile, tmpfile, etc_mail_t, device_t, etc_t, file_t, fonts_t

allow initrc_t virt_var_lib_t:dir write;
allow initrc_t virt_var_lib_t:file read;

#============= ipsec_mgmt_t ==============
allow ipsec_mgmt_t NetworkManager_t:process sigchld;

#============= virtd_t ==============
allow virtd_t sysctl_kernel_t:dir search;
allow virtd_t system_conf_t:file relabelfrom;
johanka:~#
Comment 2 Matěj Cepl 2010-06-30 17:47:52 EDT
When trying in Permissive mode NM-openswan works, but the list is longer:

johanka:~# ausearch -m AVC -ts recent|audit2allow


#============= NetworkManager_t ==============
allow NetworkManager_t ipsec_key_file_t:dir search;
#!!!! The source type 'NetworkManager_t' can write to a 'file' of the following types:
# named_cache_t, NetworkManager_tmp_t, sysctl_net_t, NetworkManager_log_t, NetworkManager_var_lib_t, NetworkManager_var_run_t, net_conf_t, pppd_var_run_t, root_t

allow NetworkManager_t ipsec_key_file_t:file { read write open };
allow NetworkManager_t ipsec_mgmt_exec_t:file { ioctl execute read open getattr execute_no_trans };
allow NetworkManager_t ipsec_t:unix_stream_socket connectto;
allow NetworkManager_t ipsec_var_run_t:dir search;
#!!!! The source type 'NetworkManager_t' can write to a 'file' of the following types:
# hald_log_t, named_cache_t, NetworkManager_tmp_t, sysctl_net_t, NetworkManager_log_t, NetworkManager_var_lib_t, NetworkManager_var_run_t, net_conf_t, pppd_var_run_t, root_t

allow NetworkManager_t ipsec_var_run_t:file { write getattr open append };
allow NetworkManager_t ipsec_var_run_t:sock_file { read write };

#============= initrc_t ==============
#!!!! This avc is a constraint violation.  You will need to add an attribute to either the source or target type to make it work.
#Contraint rule: 
allow initrc_t net_conf_t:file create;
#!!!! The source type 'initrc_t' can write to a 'dir' of the following types:
# initrc_state_t, tmpfs_t, postgresql_db_t, alsa_etc_rw_t, gconf_etc_t, var_spool_t, var_lib_t, var_run_t, cgroupfs_t, xserver_log_t, virt_cache_t, dhcpc_state_t, squid_log_t, svc_svc_t, var_log_t, ipsec_var_run_t, pam_var_run_t, rpm_var_lib_t, net_conf_t, quota_flag_t, var_lib_nfs_t, etc_runtime_t, mysqld_db_t, udev_var_run_t, initrc_tmp_t, pam_var_console_t, cgroup_t, boot_t, cert_t, mnt_t, root_t, named_conf_t, tmp_t, system_dbusd_var_lib_t, var_t, lockfile, pidfile, tmpfile, etc_mail_t, device_t, etc_t, file_t, fonts_t

allow initrc_t virt_var_lib_t:dir write;
allow initrc_t virt_var_lib_t:file read;

#============= virtd_t ==============
allow virtd_t sysctl_kernel_t:dir search;
allow virtd_t system_conf_t:file relabelfrom;
johanka:~#
Comment 4 RHEL Product and Program Management 2010-06-30 18:03:06 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 5 Miroslav Grepl 2010-07-01 10:41:18 EDT
There is another bug report for virtd issues. NetworkManager issues are duplicate of 602973 bug.

*** This bug has been marked as a duplicate of bug 602973 ***

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