Bug 1322771

Summary: long delay between avc denial and setroubleshoot message
Product: [Fedora] Fedora Reporter: Dominik Perpeet <dperpeet>
Component: setroubleshootAssignee: Petr Lautrbach <plautrba>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: dwalsh, mgrepl, plautrba, stefw
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: setroubleshoot-3.3.5-2.fc23 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-13 07:22:31 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:

Description Dominik Perpeet 2016-03-31 10:14:32 UTC
Description of problem:
Sometimes there's a long delay between a denial event and the setroubleshoot message.

Version-Release number of selected component (if applicable):
setroubleshoot-server-3.3.4-1.fc24.x86_64

How reproducible:
Always a delay, but the actual length varies

Steps to Reproduce:
1. cause an alert
2. wait for setroubleshoot message
3. compare timestamps, e.g. in journal

Actual results:
Time difference between avc denial and "SELinux is preventing" setroubleshoot message was 26 seconds and then 61 seconds.

Expected results:
If there is caching involved, as a user I would expect the first alert of its kind to be forwarded immediately so other components can react. If I run a command that fails, I don't want to wait a minute to see the setroubleshoot evaluation. Following messages can be throttled within reason.

Additional info:
Log of one run: https://fedorapeople.org/groups/cockpit/logs/pull-4118-de47a8b7-verify-fedora-24/TestSelinux-testTroubleshootAlerts-10.111.126.171-FAIL.log

Relevant lines from the logfile:
ar 31 04:29:00 localhost.localdomain audit[1342]: AVC avc:  denied  { read } for  pid=1342 comm="ls" name="admin" dev="dm-0" ino=8727406 scontext=system_u:system_r:httpd_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_dir_t:s0 tclass=dir permissive=0
Mar 31 04:29:26 localhost.localdomain setroubleshoot[1275]: SELinux is preventing ls from read access on the directory admin. For complete SELinux messages. run sealert -l b75cfd72-9a86-4103-a83a-93dbe425e881

Mar 31 04:29:26 localhost.localdomain audit[1369]: AVC avc:  denied  { read } for  pid=1369 comm="sshd" name="ssh_host_ecdsa_key" dev="dm-0" ino=8727397 scontext=system_u:system_r:sshd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:admin_home_t:s0 tclass=file permissive=0
Mar 31 04:30:27 localhost.localdomain setroubleshoot[1275]: SELinux is preventing sshd from read access on the file ssh_host_ecdsa_key. For complete SELinux messages. run sealert -l 41f7e3ab-6b30-4336-b15f-0cf1e5143a69

Comment 1 Stef Walter 2016-04-01 09:25:26 UTC
This is a usability issue. If we only tell people about issues long after they happen then it makes issue diagnosis much harder.

Comment 2 Petr Lautrbach 2016-04-01 21:35:21 UTC
I've probably found the problem so I'm working on a fix.

Comment 4 Fedora Update System 2016-04-05 05:37:05 UTC
setroubleshoot-3.3.5-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-1665e574a3

Comment 5 Fedora Update System 2016-04-05 05:37:21 UTC
setroubleshoot-3.3.5-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-93eb4bde15

Comment 6 Fedora Update System 2016-04-05 15:53:27 UTC
setroubleshoot-3.3.5-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-93eb4bde15

Comment 7 Fedora Update System 2016-04-05 19:21:50 UTC
setroubleshoot-3.3.5-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-1665e574a3

Comment 8 Fedora Update System 2016-04-07 10:02:38 UTC
setroubleshoot-3.3.5-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-1665e574a3

Comment 9 Fedora Update System 2016-04-07 10:06:05 UTC
setroubleshoot-3.3.5-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-93eb4bde15

Comment 10 Fedora Update System 2016-04-08 16:53:33 UTC
setroubleshoot-3.3.5-2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-1665e574a3

Comment 11 Fedora Update System 2016-04-08 20:51:49 UTC
setroubleshoot-3.3.5-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-93eb4bde15

Comment 12 Fedora Update System 2016-04-11 09:13:17 UTC
setroubleshoot-3.3.5-2.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2016-04-13 07:22:26 UTC
setroubleshoot-3.3.5-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.