Bug 694031
Summary: | enforcing MLS: userdel -r USERNAME causes AVCs | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Milos Malik <mmalik> |
Component: | selinux-policy | Assignee: | Miroslav Grepl <mgrepl> |
Status: | CLOSED ERRATA | QA Contact: | Milos Malik <mmalik> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 6.1 | CC: | dwalsh |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | selinux-policy-3.7.19-110.el6 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2011-12-06 10:07:17 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: | |||
Bug Blocks: | 743047 |
Description
Milos Malik
2011-04-06 09:40:46 UTC
Since RHEL 6.1 External Beta has begun, and this bug remains unresolved, it has been rejected as it is not proposed as exception or blocker. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux. The output of audit2allow: #============= useradd_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 useradd_t auditd_t:dir search; #!!!! 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 useradd_t kernel_t:dir search; Miroslav you need to add mls_process_read_to_clearance(useradd_t) Fixed in selinux-policy-3.7.19-98.el6 Were you sitting in the audit directory when you ran this test? No, I was sitting in /root directory, but I'm able to reproduce it in /tmp as well. [root@rhel62 ~]# sestatus SELinux status: enabled SELinuxfs mount: /selinux Current mode: enforcing Mode from config file: enforcing Policy version: 24 Policy from config file: mls [root@rhel62 ~]# id -Z root:sysadm_r:sysadm_t:s0-s15:c0.c1023 [root@rhel62 ~]# cd /tmp [root@rhel62 tmp]# useradd pokus [root@rhel62 tmp]# userdel -rf pokus [root@rhel62 tmp]# ausearch -m avc -m user_avc -ts recent -i | audit2allow #============= useradd_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 useradd_t audisp_t:dir search; #!!!! 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 useradd_t auditd_t:dir search; #!!!! 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 useradd_t kernel_t:dir search; [root@rhel62 tmp]# Miroslav add domain_dontaudit_read_all_domains_state(useradd_t) userdel is looking at all processes to see if a process with the user id it is deleting is running. Not sure what constraint it is failing on here since the userdel program is running with the full range. Milos can you run a process as the user that you are deleting at systemhigh useradd testuser login as testuser newrole -l SystemHigh As sysadm_t in another window execute userdel testuser and make sure userdel works properly, IE the same way in permissive mode as enforcing. Fixed in selinux-policy-3.7.19-110.el6 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2011-1511.html |