Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be unavailable on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 586760 - SELinux is preventing /bin/rm "unlink" access on /etc/resolv.conf.
Summary: SELinux is preventing /bin/rm "unlink" access on /etc/resolv.conf.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy
Version: 6.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Daniel Walsh
QA Contact: Milos Malik
URL:
Whiteboard: setroubleshoot_trace_hash:4331053ee95...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-04-28 10:27 UTC by Mark Wielaard
Modified: 2012-10-15 15:08 UTC (History)
1 user (show)

Fixed In Version: selinux-policy-3.7.19-11.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-10 21:34:24 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Mark Wielaard 2010-04-28 10:27:15 UTC
Summary:

SELinux is preventing /bin/rm "unlink" access on /etc/resolv.conf.

Detailed Description:

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

Allowing Access:

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.

Additional Information:

Source Context                unconfined_u:system_r:ipsec_mgmt_t:s0
Target Context                system_u:object_r:net_conf_t:s0
Target Objects                /etc/resolv.conf [ file ]
Source                        rm
Source Path                   /bin/rm
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           coreutils-8.4-6.el6
Target RPM Packages           
Policy RPM                    selinux-policy-3.7.19-7.el6
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed) 2.6.32-22.el6.x86_64
                              #1 SMP Tue Apr 20 12:10:42 EDT 2010 x86_64 x86_64
Alert Count                   1
First Seen                    Wed 28 Apr 2010 12:25:10 PM CEST
Last Seen                     Wed 28 Apr 2010 12:25:10 PM CEST
Local ID                      b593cdf6-0de7-4178-b330-da95cda07072
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1272450310.407:45): avc:  denied  { unlink } for  pid=4169 comm="rm" name="resolv.conf" dev=dm-0 ino=532149 scontext=unconfined_u:system_r:ipsec_mgmt_t:s0 tcontext=system_u:object_r:net_conf_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1272450310.407:45): arch=c000003e syscall=263 success=no exit=-13 a0=ffffffffffffff9c a1=15b80f0 a2=0 a3=7ffff92fa180 items=0 ppid=4166 pid=4169 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=2 comm="rm" exe="/bin/rm" subj=unconfined_u:system_r:ipsec_mgmt_t:s0 key=(null)



Hash String generated from  catchall,rm,ipsec_mgmt_t,net_conf_t,file,unlink
audit2allow suggests:

#============= ipsec_mgmt_t ==============
allow ipsec_mgmt_t net_conf_t:file unlink;

Comment 1 Mark Wielaard 2010-04-28 10:30:09 UTC
This is caused by executing ipsec auto --up rh-vpn

Which does produce an error messages:
003 "rh-vpn" #3: updateresolvconf-client command exited with status 1

and /etc/resolv.conf isn't updated with the new nameserver

Comment 2 Mark Wielaard 2010-04-28 10:33:12 UTC
After setenforce Permissive there is also the following alert:

Summary:

SELinux is preventing /bin/bash "create" access on resolv.conf.

Detailed Description:

[SELinux is in permissive mode. This access was not denied.]

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

Allowing Access:

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.

Additional Information:

Source Context                unconfined_u:system_r:ipsec_mgmt_t:s0
Target Context                unconfined_u:object_r:net_conf_t:s0
Target Objects                resolv.conf [ file ]
Source                        _updown.netkey
Source Path                   /bin/bash
Port                          <Unknown>
Host                          springer.wildebeest.org
Source RPM Packages           bash-4.1.2-2.el6
Target RPM Packages           
Policy RPM                    selinux-policy-3.7.19-7.el6
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Plugin Name                   catchall
Host Name                     springer.wildebeest.org
Platform                      Linux springer.wildebeest.org 2.6.32-22.el6.x86_64
                              #1 SMP Tue Apr 20 12:10:42 EDT 2010 x86_64 x86_64
Alert Count                   2
First Seen                    Wed 28 Apr 2010 12:31:24 PM CEST
Last Seen                     Wed 28 Apr 2010 12:31:24 PM CEST
Local ID                      3533f8ca-9fc0-4b99-b928-53bcde42b629
Line Numbers                  

Raw Audit Messages            

node=springer.wildebeest.org type=AVC msg=audit(1272450684.129:88): avc:  denied  { create } for  pid=5321 comm="_updown.netkey" name="resolv.conf" scontext=unconfined_u:system_r:ipsec_mgmt_t:s0 tcontext=unconfined_u:object_r:net_conf_t:s0 tclass=file

node=springer.wildebeest.org type=AVC msg=audit(1272450684.129:88): avc:  denied  { write } for  pid=5321 comm="_updown.netkey" name="resolv.conf" dev=dm-0 ino=532149 scontext=unconfined_u:system_r:ipsec_mgmt_t:s0 tcontext=unconfined_u:object_r:net_conf_t:s0 tclass=file

node=springer.wildebeest.org type=SYSCALL msg=audit(1272450684.129:88): arch=c000003e syscall=2 success=yes exit=3 a0=1f325c0 a1=241 a2=1b6 a3=fffffffffffffff0 items=0 ppid=5320 pid=5321 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=2 comm="_updown.netkey" exe="/bin/bash" subj=unconfined_u:system_r:ipsec_mgmt_t:s0 key=(null)

Comment 3 Mark Wielaard 2010-04-28 10:36:31 UTC
This might be a duplicate of bug #585963, but that should already have been resolved according to the rpm changelog:

* Mon Apr 26 2010 Dan Walsh <dwalsh@redhat.com> 3.7.19-6
- Allow initrc_t to read slapd_db_t
Resolves: #585476
- Allow ipsec_mgmt to use unallocated devpts and to create /etc/resolv.conf
Resolves: #585963

Comment 5 RHEL Program Management 2010-04-28 12:00:24 UTC
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 6 Daniel Walsh 2010-05-03 14:22:27 UTC
Fixed in selinux-policy-3.7.19-11.el6

Comment 10 releng-rhel@redhat.com 2010-11-10 21:34:24 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.


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