Bug 1558656 - SELinux is preventing /usr/sbin/snapperd from mounton access [rhel-7.5.z]
Summary: SELinux is preventing /usr/sbin/snapperd from mounton access [rhel-7.5.z]
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.5
Hardware: All
OS: Linux
high
unspecified
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: Milos Malik
Mirek Jahoda
URL:
Whiteboard:
Depends On: 1556798
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-03-20 17:27 UTC by Oneata Mircea Teodor
Modified: 2018-04-10 19:14 UTC (History)
11 users (show)

Fixed In Version: selinux-policy-3.13.1-192.el7_5.2
Doc Type: Bug Fix
Doc Text:
Previously, rules for the Snapper module were missing in the SELinux policy. As a consequence, the snapperd daemon was not able to create snapshots and it was not able to work properly in general. With this update, the missing rules have been added to the selinux-policy packages, and snapperd now works correctly with SELinux in enforcing mode.
Clone Of: 1556798
Environment:
Last Closed: 2018-04-10 19:14:47 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:1059 None None None 2018-04-10 19:14:55 UTC

Description Oneata Mircea Teodor 2018-03-20 17:27:03 UTC
This bug has been copied from bug #1556798 and has been proposed to be backported to 7.5 z-stream (EUS).

Comment 6 Milos Malik 2018-03-23 11:42:19 UTC
Our automated TC for snapper passes on x86_64 VM 1MT-RHEL-7.5-20180315.0 if the latest selinux-policy (3.13.1-192.el7_5.1) installed. Could you re-run your snapper tests and let us know, what are their results.

Comment 8 Milos Malik 2018-03-23 14:57:39 UTC
The same SELinux denial as mentioned in comment#7 we already saw in BZ#1063150.

Our TC found out that following rules are missing:

allow snapperd_t kernel_t : process { setsched };
allow snapperd_t fs_t : filesystem { mount };

The reason for switching this bug to ASSIGNED is that both rules should be present, but they are not. BZ#1063150 is closed as current release, therefore the rules should be present.

Comment 9 Lukas Vrabec 2018-03-23 15:32:40 UTC
Jakub, 

Following line: 

allow snapperd_t kernel_t : process { setsched };

Is allowing snapperd to set priority for kernel threads. Is to okay? Snapperd is manipulating with kernel threads prio? 

THanks,
Lukas.

Comment 10 Jakub Krysl 2018-03-26 08:06:58 UTC
Lukas,
I lack the knowledge to answer this properly, this is more a question for Ondrej.
Jakub

Comment 11 Ondrej Kozina 2018-03-26 08:44:37 UTC
Snapperd is lowering priority of background tasks (threads) performing snapshot comparison. Both process priority and i/o priority are set (lowered).

setpriority()
syscall(SYS_ioprio_set,...)

Comment 15 errata-xmlrpc 2018-04-10 19:14:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:1059


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