Bug 834143 - SELinux is preventing /usr/bin/python2.7 from 'execute' accesses on the file /etc/tuned/macbook/script.sh.
Summary: SELinux is preventing /usr/bin/python2.7 from 'execute' accesses on the file ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 17
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:7d626e3018b2f00eb451e15e81d...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-21 00:35 UTC by ngativ
Modified: 2012-06-30 21:51 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-30 21:51:56 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description ngativ 2012-06-21 00:35:52 UTC
libreport version: 2.0.10
executable:     /usr/bin/python2.7
hashmarkername: setroubleshoot
kernel:         3.4.2-4.fc17.x86_64
time:           Wed 20 Jun 2012 07:34:51 PM CDT

description:
:SELinux is preventing /usr/bin/python2.7 from 'execute' accesses on the file /etc/tuned/macbook/script.sh.
:
:*****  Plugin leaks (86.2 confidence) suggests  ******************************
:
:If you want to ignore python2.7 trying to execute access the script.sh 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
:# grep /usr/bin/python2.7 /var/log/audit/audit.log | audit2allow -D -M mypol
:# semodule -i mypol.pp
:
:*****  Plugin catchall (14.7 confidence) suggests  ***************************
:
:If you believe that python2.7 should be allowed execute access on the script.sh 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:
:# grep tuned /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:tuned_t:s0
:Target Context                unconfined_u:object_r:etc_t:s0
:Target Objects                /etc/tuned/macbook/script.sh [ file ]
:Source                        tuned
:Source Path                   /usr/bin/python2.7
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           python-2.7.3-6.fc17.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-132.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.4.2-4.fc17.x86_64 #1 SMP Thu
:                              Jun 14 22:22:05 UTC 2012 x86_64 x86_64
:Alert Count                   1
:First Seen                    Thu 21 Jun 2012 12:33:15 AM CDT
:Last Seen                     Thu 21 Jun 2012 12:33:15 AM CDT
:Local ID                      f49eeac3-8ea8-4832-b1b3-0f41dfd26d2e
:
:Raw Audit Messages
:type=AVC msg=audit(1340256795.795:52): avc:  denied  { execute } for  pid=969 comm="tuned" name="script.sh" dev="sda6" ino=660944 scontext=system_u:system_r:tuned_t:s0 tcontext=unconfined_u:object_r:etc_t:s0 tclass=file
:
:
:type=SYSCALL msg=audit(1340256795.795:52): arch=x86_64 syscall=execve success=no exit=EACCES a0=7f8ba40037a0 a1=7f8ba4003ec0 a2=7fff5fa0bea8 a3=20 items=0 ppid=574 pid=969 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=tuned exe=/usr/bin/python2.7 subj=system_u:system_r:tuned_t:s0 key=(null)
:
:Hash: tuned,tuned_t,etc_t,file,execute
:
:audit2allowunable to open /sys/fs/selinux/policy:  Permission denied
:
:
:audit2allow -Runable to open /sys/fs/selinux/policy:  Permission denied
:
:

Comment 1 ngativ 2012-06-21 00:47:18 UTC
I just made a tuned script using powertop2tuned.

Everytime a reboot selinux complains about the script being executed by tuned (python). And i have to "grep tuned /var/log/audit/audit.log | audit2allow -M mypol ;  semodule -i mypol.pp"

I gave up and disabled selinux

Comment 2 Miroslav Grepl 2012-06-21 05:53:47 UTC
You can fix it using

# chcon -t bin_t /etc/tuned/macbook/script.sh

Fixed in selinux-policy-3.10.0-133.fc17.noarch

Comment 3 ngativ 2012-06-21 14:28:06 UTC
Thanks! i am new to fedora and selinux

Comment 4 Fedora Update System 2012-06-26 21:48:08 UTC
selinux-policy-3.10.0-134.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-134.fc17

Comment 5 Fedora Update System 2012-06-28 03:38:20 UTC
Package selinux-policy-3.10.0-134.fc17:
* should fix your issue,
* was pushed to the Fedora 17 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.10.0-134.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-10008/selinux-policy-3.10.0-134.fc17
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2012-06-30 21:51:56 UTC
selinux-policy-3.10.0-134.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.


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