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 1802062 - Add a SELinux boolean to allow SSSD to access kernel keyrings labeled system_u:system_r:kernel_t:s0
Summary: Add a SELinux boolean to allow SSSD to access kernel keyrings labeled system_...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: selinux-policy
Version: 8.4
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: 8.3
Assignee: Zdenek Pytela
QA Contact: Milos Malik
URL:
Whiteboard:
: 1887494 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-12 09:49 UTC by Sumit Bose
Modified: 2022-05-10 17:29 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-04 01:56:01 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 5479761 0 None None None 2020-10-12 17:26:35 UTC
Red Hat Product Errata RHBA-2020:4528 0 None None None 2020-11-04 01:56:25 UTC

Description Sumit Bose 2020-02-12 09:49:47 UTC
Description of problem:

If the kernel keyring is used to store the Kerberos credential cache (ccache type KEYRING) and some kernel modules like cifs or nfs have created the keyring for the user before, it is labeled with system_u:system_r:kernel_t:s0 which makes sense because a kernel module created it.system_u:system_r:kernel_t:s0

In the default policy SSSD is not allowed to access it. Imo just changing the default policy to allow this might be a bit too broad.

Would it be possible to add a SELinux boolean which can be enabled on system where SSSD has to access keyrings labeled with system_u:system_r:kernel_t:s0 but is disabled by default?

For more context see https://bugzilla.redhat.com/show_bug.cgi?id=1301686.

Comment 1 Lukas Slebodnik 2020-03-24 09:02:07 UTC
(In reply to Sumit Bose from comment #0)
> Description of problem:
> 
> If the kernel keyring is used to store the Kerberos credential cache (ccache
> type KEYRING) and some kernel modules like cifs or nfs have created the
> keyring for the user before, it is labeled with
> system_u:system_r:kernel_t:s0 which makes sense because a kernel module
> created it.system_u:system_r:kernel_t:s0
> 

There are more issues with KEYRING ccache. SELinux labeling does not work well with
containers. That's the reason why KCM is default on rhel8.

What is the reason for using KEYRING ccache with cifs or nfs

Comment 2 Sumit Bose 2020-03-24 09:50:02 UTC
(In reply to Lukas Slebodnik from comment #1)
> (In reply to Sumit Bose from comment #0)
> > Description of problem:
> > 
> > If the kernel keyring is used to store the Kerberos credential cache (ccache
> > type KEYRING) and some kernel modules like cifs or nfs have created the
> > keyring for the user before, it is labeled with
> > system_u:system_r:kernel_t:s0 which makes sense because a kernel module
> > created it.system_u:system_r:kernel_t:s0
> > 
> 
> There are more issues with KEYRING ccache. SELinux labeling does not work
> well with
> containers. That's the reason why KCM is default on rhel8.
> 
> What is the reason for using KEYRING ccache with cifs or nfs

This came from an issue on RHEL7 (https://bugzilla.redhat.com/show_bug.cgi?id=1301686). I guess we will ask for a backport when this is fixed on RHEL8.

Comment 3 Lukas Slebodnik 2020-03-24 11:22:08 UTC
(In reply to Sumit Bose from comment #2)
> (In reply to Lukas Slebodnik from comment #1)
> > (In reply to Sumit Bose from comment #0)
> > > Description of problem:
> > > 
> > > If the kernel keyring is used to store the Kerberos credential cache (ccache
> > > type KEYRING) and some kernel modules like cifs or nfs have created the
> > > keyring for the user before, it is labeled with
> > > system_u:system_r:kernel_t:s0 which makes sense because a kernel module
> > > created it.system_u:system_r:kernel_t:s0
> > > 
> > 
> > There are more issues with KEYRING ccache. SELinux labeling does not work
> > well with
> > containers. That's the reason why KCM is default on rhel8.
> > 
> > What is the reason for using KEYRING ccache with cifs or nfs
> 
> This came from an issue on RHEL7
> (https://bugzilla.redhat.com/show_bug.cgi?id=1301686). I guess we will ask
> for a backport when this is fixed on RHEL8.

I am sorry you did not answer my question.
(SELinux guys needn't be aware of changes in defautls for various components)
Let me be more specific.

What is the reason for using KEYRING ccache with cifs or nfs rhel8?

Comment 6 Sumit Bose 2020-04-27 10:55:20 UTC
(In reply to Lukas Slebodnik from comment #3)
> (In reply to Sumit Bose from comment #2)
> > (In reply to Lukas Slebodnik from comment #1)
> > > (In reply to Sumit Bose from comment #0)
> > > > Description of problem:
> > > > 
> > > > If the kernel keyring is used to store the Kerberos credential cache (ccache
> > > > type KEYRING) and some kernel modules like cifs or nfs have created the
> > > > keyring for the user before, it is labeled with
> > > > system_u:system_r:kernel_t:s0 which makes sense because a kernel module
> > > > created it.system_u:system_r:kernel_t:s0
> > > > 
> > > 
> > > There are more issues with KEYRING ccache. SELinux labeling does not work
> > > well with
> > > containers. That's the reason why KCM is default on rhel8.
> > > 
> > > What is the reason for using KEYRING ccache with cifs or nfs
> > 
> > This came from an issue on RHEL7
> > (https://bugzilla.redhat.com/show_bug.cgi?id=1301686). I guess we will ask
> > for a backport when this is fixed on RHEL8.
> 
> I am sorry you did not answer my question.
> (SELinux guys needn't be aware of changes in defautls for various components)
> Let me be more specific.
> 
> What is the reason for using KEYRING ccache with cifs or nfs rhel8?

Hi,

I recently came across a case where a customer preferred to stay with KEYRING and as default and not installing the 'sssd-kcm' packages for performance reason. The performance issue was neither caused by nfs nor cifs but a 3rd party application, nevertheless the customer stayed with KEYRING.

HTH

bye,
Sumit

Comment 7 Lukas Slebodnik 2020-04-27 17:01:49 UTC
(In reply to Sumit Bose from comment #6)
> (In reply to Lukas Slebodnik from comment #3)
> > I am sorry you did not answer my question.
> > (SELinux guys needn't be aware of changes in defautls for various components)
> > Let me be more specific.
> > 
> > What is the reason for using KEYRING ccache with cifs or nfs rhel8?
> 
> Hi,
> 
> I recently came across a case where a customer preferred to stay with
> KEYRING and as default and not installing the 'sssd-kcm' packages for
> performance reason. The performance issue was neither caused by nfs nor cifs
> but a 3rd party application, nevertheless the customer stayed with KEYRING.
> 

Thank you very much Sumit for the reply.

Comment 19 Zdenek Pytela 2020-10-12 17:26:35 UTC
*** Bug 1887494 has been marked as a duplicate of this bug. ***

Comment 21 errata-xmlrpc 2020-11-04 01:56:01 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 (selinux-policy bug fix and enhancement update), 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-2020:4528


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