RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1830493 - Typo in section 4.5.
Summary: Typo in section 4.5.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: doc-SELinux_Users_and_Administrators_Guide
Version: 7.8
Hardware: Unspecified
OS: Linux
high
low
Target Milestone: rc
: ---
Assignee: Mirek Jahoda
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-02 08:22 UTC by Tsur Trieger
Modified: 2020-05-29 09:52 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-29 09:52:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Tsur Trieger 2020-05-02 08:22:17 UTC
Description of problem:
I think there is a mistake on page 32, section 4.5. Changing SELinux modes at boot time


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
On page 32, under 4.5. Changing SELinux modes at boot time

..."In permissive mode, only the first denial is reported. However, in enforcing mode you might get a
denial on reading a directory and an application stops. In permissive mode, you get the same AVC
message, but the application continues reading files in the directory and you get an AVC for each
denial in addition."




Actual results:
As far as I know, Permissive mode let the application continue to run, but report EACH violation it made. Therefore, on permissive mode, ALL denials are reported and not only the first one, due to the fact that the application will continue to run despite the violations.


Expected results:


Additional info:
As far as I know, the correct sentence is: ..."In permissive mode, all denials are reported. However,"...

Link to the manual:
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/pdf/selinux_users_and_administrators_guide/Red_Hat_Enterprise_Linux-7-SELinux_Users_and_Administrators_Guide-en-US.pdf

Comment 1 Petr Bokoc 2020-05-11 11:51:30 UTC
Hello, thank you for the report. It seems that this has been misfiled, the document is RHEL 7 documentation, not Fedora documentation, so I'm changing the product and component and someone from the RHEL documentation team will pick this up.

Comment 3 Mirek Jahoda 2020-05-18 16:18:15 UTC
I believe that it should read as:

"In *enforcing* mode, only the first denial is reported. However, in enforcing mode you might get a
denial on reading a directory and an application stops. In permissive mode, you get the same AVC
message, but the application continues reading files in the directory and you get an AVC for each
denial in addition."

Petr, what is the most appropriate wording from your perspective?

Comment 4 Petr Lautrbach 2020-05-18 16:41:50 UTC
Let me show you an example:

[root@localhost ~]# setenforce 1
[root@localhost ~]# date
Mon May 18 18:35:33 CEST 2020
[root@localhost ~]# runcon -t user_t -r user_r -u user_u -l s0 -- cat /etc/passwd > /dev/null
runcon: 'cat': Permission denied
[root@localhost ~]# runcon -t user_t -r user_r -u user_u -l s0 -- cat /etc/passwd > /dev/null
runcon: 'cat': Permission denied
[root@localhost ~]# runcon -t user_t -r user_r -u user_u -l s0 -- cat /etc/passwd > /dev/null
runcon: 'cat': Permission denied
[root@localhost ~]# ausearch -m avc -ts 18:35:33
----
time->Mon May 18 18:35:38 2020
type=AVC msg=audit(1589819738.988:690): avc:  denied  { transition } for  pid=22368 comm="runcon" path="/usr/bin/cat" dev="dm-1" ino=786826 scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=user_u:user_r:user_t:s0 tclass=process permissive=0
----
time->Mon May 18 18:35:38 2020
type=AVC msg=audit(1589819738.988:691): avc:  denied  { transition } for  pid=22368 comm="runcon" path="/usr/bin/cat" dev="dm-1" ino=786826 scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=user_u:user_r:user_t:s0 tclass=process permissive=0
----
time->Mon May 18 18:35:39 2020
type=AVC msg=audit(1589819739.842:692): avc:  denied  { transition } for  pid=22374 comm="runcon" path="/usr/bin/cat" dev="dm-1" ino=786826 scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=user_u:user_r:user_t:s0 tclass=process permissive=0
----
time->Mon May 18 18:35:39 2020
type=AVC msg=audit(1589819739.842:693): avc:  denied  { transition } for  pid=22374 comm="runcon" path="/usr/bin/cat" dev="dm-1" ino=786826 scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=user_u:user_r:user_t:s0 tclass=process permissive=0
----
time->Mon May 18 18:35:40 2020
type=AVC msg=audit(1589819740.673:694): avc:  denied  { transition } for  pid=22375 comm="runcon" path="/usr/bin/cat" dev="dm-1" ino=786826 scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=user_u:user_r:user_t:s0 tclass=process permissive=0
----
time->Mon May 18 18:35:40 2020
type=AVC msg=audit(1589819740.673:695): avc:  denied  { transition } for  pid=22375 comm="runcon" path="/usr/bin/cat" dev="dm-1" ino=786826 scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=user_u:user_r:user_t:s0 tclass=process permissive=0


You get the same AVC denial message several times. But:

[root@localhost ~]# runcon -t user_t -r user_r -u user_u -l s0 -- cat /etc/passwd > /dev/null
[root@localhost ~]# runcon -t user_t -r user_r -u user_u -l s0 -- cat /etc/passwd > /dev/null
[root@localhost ~]# runcon -t user_t -r user_r -u user_u -l s0 -- cat /etc/passwd > /dev/null
[root@localhost ~]# ausearch -m avc -ts 18:38:24
----
time->Mon May 18 18:38:27 2020
type=AVC msg=audit(1589819907.682:710): avc:  denied  { transition } for  pid=22827 comm="runcon" path="/usr/bin/cat" dev="dm-1" ino=786826 scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=user_u:user_r:user_t:s0 tclass=process permissive=1

You get only 1 AVC denial message despite the fact that SELinux would denied transition at least 3 times in enforcing.


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