Bug 808368
| Summary: | Policy doesn't allow write between passwd_t and user_tmp_t | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Fabian Deutsch <fdeutsch> | ||||
| Component: | selinux-policy | Assignee: | Miroslav Grepl <mgrepl> | ||||
| Status: | CLOSED NOTABUG | QA Contact: | BaseOS QE Security Team <qe-baseos-security> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 6.3 | CC: | dwalsh, mmalik | ||||
| Target Milestone: | rc | ||||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2012-03-30 17:47:32 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: | 520345 | ||||||
| Attachments: |
|
||||||
|
Description
Fabian Deutsch
2012-03-30 09:28:52 UTC
I queried the selinux policy on the wrong machine. This is the policy used: $ rpm -q selinux-policy selinux-policy-3.7.19-142.el6.noarch The problem is a tool is running as unconfined_t and if executes passwd then it ends up as passwd_t.
allow unconfined_t passwd_t : process transition ;
So if you redirect an output, you write to user_tmp_t which is created by a tool and we allow
$ sesearch -A -s passwd_t -t user_tmp_t -c file
Found 2 semantic av rules:
allow application_domain_type user_tmp_t : file { getattr append } ;
allow passwd_t user_tmp_type : file { ioctl read getattr lock open } ;
So we allow only append operation for this situation.
So what would be the solution for the tool to prevent this avc message? Could you append the file in the /tmp? passwd | cat > /tmp/blah Would work around the problem. |