Bug 1305792

Summary: [sesearch] Unable to see SELinux policy rules for specific source type when rule is allowed for whole attribute.
Product: [Fedora] Fedora Reporter: Lukas Vrabec <lvrabec>
Component: setoolsAssignee: Petr Lautrbach <plautrba>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 23CC: cpebenito, dwalsh, mgrepl, plautrba
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: 2016-12-20 18:33:25 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 Lukas Vrabec 2016-02-09 09:05:07 UTC
Description of problem:
Unable to see rules for specific source type when rule is allowed for whole attribute

Version-Release number of selected component (if applicable):
setools-3.3.8-8.99.1.fc23.x86_64

How reproducible:
Always

Steps to Reproduce:
1.Using tool 'audit2allow' you can see that rule is already allowed in SELinux policy:

#============= telepathy_mission_control_t ==============

#!!!! This avc is allowed in the current policy
allow telepathy_mission_control_t user_tty_device_t:chr_file { read write };


2. Try to find this rule using tool 'sesearch'

$ sesearch -A  -s telepathy_mission_control_t -t user_tty_device_t

Using sesearch when source type 'telepathy_mission_control_t' is set, you can see that rule is missing. 
This rule is allowed for whole attribute called: 'telepathy_domain'.

$ seinfo -atelepathy_domain -x 
   telepathy_domain
      telepathy_gabble_t
      telepathy_idle_t
      telepathy_logger_t
      telepathy_mission_control_t
      telepathy_msn_t
      telepathy_salut_t
      telepathy_sofiasip_t
      telepathy_stream_engine_t
      telepathy_sunshine_t

So if you use sesearch where source type will be telepathy_domain it works.

Found 1 semantic av rules:
   allow telepathy_domain user_tty_device_t : chr_file { ioctl read write getattr lock append } ; 


Actual results:
Unable to see rules for specific source type when rule is allowed for whole attribute, when source type is included in this attribute.  

Expected results:
Tool 'sesearch' finds all rules for specific source type when rule is allowed for whole attribute, when source type is included in this attribute.

Comment 1 Petr Lautrbach 2016-02-10 14:04:42 UTC
setools-3.3.8-8.99.1.fc23.x86_64 is not an official Fedora build. Nevertheless can you provide versions of libsepol package you have or your system please?

Comment 2 Lukas Vrabec 2016-02-15 09:39:14 UTC
Sure.

$ rpm -q libsepol
libsepol-2.5-0.99.rc1.1.fc23.x86_64

This package is also from your copr selinux repo.

Comment 3 Fedora End Of Life 2016-11-24 15:28:19 UTC
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.

Comment 4 Fedora End Of Life 2016-12-20 18:33:25 UTC
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.