Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1743093

Summary: SELinux is preventing /usr/sbin/ip from write access on the file /var/log/vmware-imc/toolsDeployPkg.log
Product: Red Hat Enterprise Linux 7 Reporter: Sandeep MJ <sjayapra>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED WONTFIX QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.7CC: daniele.raffo, lvrabec, mmalik, plautrba, ssekidde, vmojzis, zpytela
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1721943 Environment:
Last Closed: 2019-08-21 10:52:49 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:
Bug Depends On: 1721943    
Bug Blocks:    

Description Sandeep MJ 2019-08-19 05:38:23 UTC
+++ This bug was initially created as a clone of Bug #1721943 +++

Note: This bug should perhaps be filed on the VMWare bugtracking platform as it is supposed to install the appropriate local policy module.  If this is the case, feel free to close and consider this a FYI.   


Description of problem: sealert reports that SELinux is preventing /usr/sbin/ip from write access on the file /var/log/vmware-imc/toolsDeployPkg.log


Version-Release number of selected component (if applicable): selinux-policy.noarch 3.14.1-61.el8


How reproducible: Always


Steps to Reproduce: sealert -a /var/log/audit/audit.log


Actual results: sealert reports that SELinux is preventing /usr/sbin/ip from write access on the file /var/log/vmware-imc/toolsDeployPkg.log


Expected results: A SELinux policy should be in place to allow access to that file 


Additional info: (output of sealert command follows)

found 1 alerts in /var/log/audit/audit.log
--------------------------------------------------------------------------------

SELinux is preventing /usr/sbin/ip from write access on the file /var/log/vmware-imc/toolsDeployPkg.log.

*****  Plugin leaks (86.2 confidence) suggests   *****************************

If you want to ignore ip trying to write access the toolsDeployPkg.log file, because you believe it should not need this access.
Then you should report this as a bug.
You can generate a local policy module to dontaudit this access.
Do
# ausearch -x /usr/sbin/ip --raw | audit2allow -D -M my-ip
# semodule -X 300 -i my-ip.pp

*****  Plugin catchall (14.7 confidence) suggests   **************************

If you believe that ip should be allowed write access on the toolsDeployPkg.log 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 'ip' --raw | audit2allow -M my-ip
# semodule -X 300 -i my-ip.pp


Additional Information:
Source Context                system_u:system_r:ifconfig_t:s0
Target Context                system_u:object_r:vmware_log_t:s0
Target Objects                /var/log/vmware-imc/toolsDeployPkg.log [ file ]
Source                        ip
Source Path                   /usr/sbin/ip
Port                          <Unknown>
Host                          <Unknown>
Source RPM Packages           iproute-4.18.0-11.el8.x86_64
Target RPM Packages
Policy RPM                    selinux-policy-3.14.1-61.el8.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     <redacted>
Platform                      Linux <redacted> 4.18.0-80.1.2.el8_0.x86_64 #1 SMP
                              Sun Apr 28 09:21:22 UTC 2019 x86_64 x86_64
Alert Count                   4
First Seen                    2019-06-18 15:29:42 CEST
Last Seen                     2019-06-18 15:29:42 CEST
Local ID                      ee6df0d5-5c48-4b25-a2ff-1ca0c42ab87b

Raw Audit Messages
type=AVC msg=audit(1560864582.306:23): avc:  denied  { write } for  pid=1167 comm="ip" path="/var/log/vmware-imc/toolsDeployPkg.log" dev="dm-4" ino=23119 scontext=system_u:system_r:ifconfig_t:s0 tcontext=system_u:object_r:vmware_log_t:s0 tclass=file permissive=0


type=SYSCALL msg=audit(1560864582.306:23): arch=x86_64 syscall=execve success=yes exit=0 a0=5585ddd3c790 a1=5585ddcea120 a2=5585dd622e80 a3=8 items=0 ppid=1106 pid=1167 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=ip exe=/usr/sbin/ip subj=system_u:system_r:ifconfig_t:s0 key=(null)ARCH=x86_64 SYSCALL=execve AUID=unset UID=root GID=root EUID=root SUID=root FSUID=root EGID=root SGID=root FSGID=root

Hash: ip,ifconfig_t,vmware_log_t,file,write

--- Additional comment from Lukas Vrabec on 2019-07-24 23:07:21 EST ---

Hi Daniele, 

Do you have any idea why would ip command write to "/var/log/vmware-imc/toolsDeployPkg.log" ? This doesn't looks like to me that should be enabled by default. Could you please describe what's going on that machine? 

Thanks,
Lukas.

--- Additional comment from daniele.raffo on 2019-07-25 21:28:06 EST ---

There's not much to say.  It's just a fresh RHEL 8 install on a test VM, configured with user authentication (via sssd) from a remote LDAP server.
The package open-vm-tools is installed (v10.3.0-2.el8).

--- Additional comment from Lukas Vrabec on 2019-07-26 00:23:08 EST ---

Fixes for Fedora:
commit 2f909f93138b6b66f8a6bc62afdbe5598da00f29 (HEAD -> rawhide)
Author: Lukas Vrabec <lvrabec>
Date:   Thu Jul 25 16:22:22 2019 +0200

    Allow ifconfig_t domain to manage vmware logs

Comment 2 Sandeep MJ 2019-08-19 05:47:54 UTC
Customer is hitting this after the latest update:

~~~
time->Thu Aug 15 09:22:54 2019
type=PROCTITLE msg=audit(1565824974.994:183): proctitle=2F7573722F7362696E2F697000616464720073686F77
type=PATH msg=audit(1565824974.994:183): item=1 name="/lib64/ld-linux-x86-64.so.2" inode=1506 dev=fd:00 mode=0100755 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:ld_so_t:s0 objtype=NORMAL cap_fp=0000000000000000 cap_fi=0000000000000000 cap_fe=0 cap_fver=0
type=PATH msg=audit(1565824974.994:183): item=0 name="/usr/sbin/ip" inode=14019 dev=fd:00 mode=0100755 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:ifconfig_exec_t:s0 objtype=NORMAL cap_fp=0000000000000000 cap_fi=0000000000000000 cap_fe=0 cap_fver=0
type=CWD msg=audit(1565824974.994:183):  cwd="/"
type=EXECVE msg=audit(1565824974.994:183): argc=3 a0="/usr/sbin/ip" a1="addr" a2="show"
type=SYSCALL msg=audit(1565824974.994:183): arch=c000003e syscall=59 success=yes exit=0 a0=1808c10 a1=1808ba0 a2=11a31f0 a3=7fffc54569e0 items=2 ppid=1399 pid=1457 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="ip" exe="/usr/sbin/ip" subj=system_u:system_r:ifconfig_t:s0 key=(null)
type=AVC msg=audit(1565824974.994:183): avc:  denied  { read write } for  pid=1457 comm="ip" path="/dev/dri/renderD128" dev="devtmpfs" ino=10948 scontext=system_u:system_r:ifconfig_t:s0 tcontext=system_u:object_r:dri_device_t:s0 tclass=chr_file permissive=0
type=AVC msg=audit(1565824974.994:183): avc:  denied  { write } for  pid=1457 comm="ip" path="/var/log/vmware-imc/toolsDeployPkg.log" dev="dm-3" ino=92 scontext=system_u:system_r:ifconfig_t:s0 tcontext=system_u:object_r:vmware_log_t:s0 tclass=file permissive=0
type=AVC msg=audit(1565824974.994:183): avc:  denied  { read write } for  pid=1457 comm="ip" path="socket:[23476]" dev="sockfs" ino=23476 scontext=system_u:system_r:ifconfig_t:s0 tcontext=system_u:system_r:vmtools_t:s0 tclass=socket permissive=0
type=AVC msg=audit(1565824974.994:183): avc:  denied  { write } for  pid=1457 comm="ip" path="/var/log/vmware-vmsvc.log" dev="dm-3" ino=74 scontext=system_u:system_r:ifconfig_t:s0 tcontext=system_u:object_r:vmware_log_t:s0 tclass=file permissive=0
~~~

Comment 4 Zdenek Pytela 2019-08-21 10:52:49 UTC
This issue was not selected to be included in Red Hat Enterprise Linux 7 because it is seen either as low or moderate impact to a small number of use-cases. The next minor release will be in Maintenance Support 1 Phase, which means that qualified Critical and Important Security errata advisories (RHSAs) and Urgent Priority Bug Fix errata advisories (RHBAs) may be released as they become available.

We will now close this issue, but if you believe that it qualifies for the Maintenance Support 1 Phase, please re-open; otherwise, we recommend moving the request to Red Hat Enterprise Linux 8 if applicable.