Bug 883422
| Summary: | tuned: please fix selinux AVCs for generated profiles | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Jaroslav Škarvada <jskarvad> |
| Component: | selinux-policy | Assignee: | Miroslav Grepl <mgrepl> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 18 | CC: | dominick.grift, dwalsh, jvcelak, mgrepl |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2012-12-07 04:29:15 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Who does it generate? I mean these profiles located in the /etc/tuned. These scripts needs to be labeled as bin_t. (In reply to comment #1) > Who does it generate? I mean these profiles located in the /etc/tuned. > > These scripts needs to be labeled as bin_t. /usr/bin/powertop2tuned Ok and it is started by a user? It needs to be started by root to create profile in /etc/tuned. Regular user can use the tool, to generate profiles locally (or everywhere the user has write permission). This functionality is e.g. for debug/analysis. Such profiles aren't used by tuned. commit b31836ca079a93ab9636135c376c0a0829580723
Author: Miroslav Grepl <mgrepl>
Date: Wed Dec 5 07:49:14 2012 +0100
Allow tuned to execute profiles scripts in /etc/tuned
selinux-policy-3.11.1-60.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/FEDORA-2012-19374/selinux-policy-3.11.1-60.fc18 Package selinux-policy-3.11.1-60.fc18: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing selinux-policy-3.11.1-60.fc18' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-19374/selinux-policy-3.11.1-60.fc18 then log in and leave karma (feedback). selinux-policy-3.11.1-60.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report. |
Description of problem: There are AVCs for generated profiles. Version-Release number of selected component (if applicable): tuned-2.1.0-1 selinux-policy-3.11.1-59 How reproducible: Always Steps to Reproduce: 1. powertop2tuned -f test 2. tuned-adm profile test 3. tuned profile test Actual results: AVC Expected results: No AVC Additional info: type=AVC msg=audit(1354631821.314:372): avc: denied { execute } for pid=3187 comm="tuned" name="script.sh" dev="sda2" ino=789374 scontext=system_u:system_r:tuned_t:s0 tcontext=unconfined_u:object_r:tuned_etc_t:s0 tclass=file type=AVC msg=audit(1354631821.314:372): avc: denied { execute_no_trans } for pid=3187 comm="tuned" path="/etc/tuned/test/script.sh" dev="sda2" ino=789374 scontext=system_u:system_r:tuned_t:s0 tcontext=unconfined_u:object_r:tuned_etc_t:s0 tclass=file type=SYSCALL msg=audit(1354631821.314:372): arch=40000003 syscall=11 success=yes exit=0 a0=b5401768 a1=b540b448 a2=bfcb7a98 a3=b540b450 items=0 ppid=3184 pid=3187 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="script.sh" exe="/usr/bin/bash" subj=system_u:system_r:tuned_t:s0 key=(null) Generated profiles are stored under /etc/tuned/. Every profile is directory. From the profiles custom commands can be execued. Theoretically any custom command can be executed but our powertop2tuned tool only generates bash scripts that are called script.sh. The script.sh is stored in the profile directory. I think it should be enough to add support only for this pattern.