Additional info: libreport version: 2.0.18 kernel: 3.4.21-1.rt32.1.fc17.ccrma.x86_64.rt description: :SELinux is preventing /usr/bin/python2.7 from 'open' accesses on the file /var/lib/rpm/__db.001. : :***** Plugin catchall (100. confidence) suggests *************************** : :If you believe that python2.7 should be allowed open access on the __db.001 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 system_u:object_r:rpm_var_lib_t:s0 :Target Objects /var/lib/rpm/__db.001 [ file ] :Source tuned :Source Path /usr/bin/python2.7 :Port <Unknown> :Host (removed) :Source RPM Packages python-2.7.3-7.2.fc17.x86_64 :Target RPM Packages rpm-4.9.1.3-7.fc17.x86_64 :Policy RPM selinux-policy-3.10.0-161.fc17.noarch :Selinux Enabled True :Policy Type targeted :Enforcing Mode Permissive :Host Name (removed) :Platform Linux (removed) : 3.4.21-1.rt32.1.fc17.ccrma.x86_64.rt #1 SMP : PREEMPT RT Fri Dec 7 10:02:23 PST 2012 x86_64 : x86_64 :Alert Count 5 :First Seen 2012-12-28 20:22:06 BRT :Last Seen 2012-12-28 21:13:50 BRT :Local ID 389d2520-d1e8-4bfa-9845-bfd7b8794ff3 : :Raw Audit Messages :type=AVC msg=audit(1356740030.554:148): avc: denied { open } for pid=4315 comm="tuned" name="__db.001" dev="sda2" ino=983 scontext=system_u:system_r:tuned_t:s0 tcontext=system_u:object_r:rpm_var_lib_t:s0 tclass=file : : :type=SYSCALL msg=audit(1356740030.554:148): arch=x86_64 syscall=open success=yes exit=EINTR a0=14db6b0 a1=2 a2=0 a3=16 items=0 ppid=1 pid=4315 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,rpm_var_lib_t,file,open : :audit2allowunable to open /sys/fs/selinux/policy: Permission denied : : :audit2allow -Runable to open /sys/fs/selinux/policy: Permission denied : :
Created attachment 670003 [details] File: type
Created attachment 670004 [details] File: hashmarkername
Is tuned reading the rpm database?
(In reply to comment #3) > Is tuned reading the rpm database? It shouldn't be. No idea what's the source.
Bernardo, do you have reproducer for this? Which tuned profile did you use?
import rpm ???
(In reply to comment #6) > import rpm ??? I cannot see this in the code, nor trace, tuned-2.0.1-5.fc17
Does tuned use plugins?
(In reply to comment #8) > Does tuned use plugins? It may be caused by user customized profile / commands in the profile. I am unable to reproduce this on my machines. Waiting for more info from reporter.
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
I hit this bug, and all I did was yum install tuned; systemctl enable tuned; systemctl start tuned (On Fedora 18).
I have selinux-policy-3.11.1-76.fc18 and I am unable to reproduce the AVC. Is there already noaudit rule for this? Maybe I got the source of this problem. There is abrt hook installed by abrt-addon-python which fires in case of exception, it imports rpm and touches the db. It maybe the source of this AVC. Bernardo or Scott could you please upload an output of the following command (as an attachment): # journalctl | grep tuned
(In reply to comment #12) > I have selinux-policy-3.11.1-76.fc18 and I am unable to reproduce the AVC. > Is there already noaudit rule for this? > I rebuilt the policy without noaudit rules and got the following AVC: type=AVC msg=audit(1360593646.225:273): avc: denied { getattr } for pid=10626 comm="tuned" path="/var/lib/rpm" dev="dm-1" ino=1310739 scontext=system_u:system_r:tuned_t:s0 tcontext=system_u:object_r:rpm_var_lib_t:s0 tclass=dir > Maybe I got the source of this problem. There is abrt hook installed by > abrt-addon-python which fires in case of exception, it imports rpm and > touches the db. It maybe the source of this AVC. > With /usr/lib/python2.7/site-packages/abrt.pth hook removed there is no AVC. Well it is different AVC, but I suspect the source is the same.
Created attachment 696345 [details] "journalctl | grep tuned" after "systemctl start tuned" See attachment
ABRT python hook reads the rpm database, so it's very possible that the AVC is caused by our code. However it needs to read it.
(In reply to comment #14) > Created attachment 696345 [details] > "journalctl | grep tuned" after "systemctl start tuned" > > See attachment Thanks, it's clear now. From the journalctl log it seems you are also affected by bug 909445 which raises an exception. This exception is catched by abrt and it results in this AVC. In case there is no exception it is not reproducible (that's why I was not successful reproducing this in comment 7). I think the best we can do now is dontaudit. Reassigning to selinux guys - feel free to close this in case there is already dontaudit rule in the current policy.
Why does abrt need to read the rpm database?
If the rpm database is available it stores the NEVRA of packages participating in the crash. For this it needs the exception object so it has to happen in the exception handler in the crashing program.
I think the python hook could be simplified not to do it, filled RFE bug 912378.
This message is a reminder that Fedora 17 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 17. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '17'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 17's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 17 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior to Fedora 17's end of life. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle. Changing version to '23'. (As we did not run this process for some time, it could affect also pre-Fedora 23 development cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.) More information and reason for this action is here: https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23
This message is a reminder that Fedora 23 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 23. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '23'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 23 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.