Bug 1496569 - Adjust selinux policies in Fedora 28 to allow new NSS filenames
Summary: Adjust selinux policies in Fedora 28 to allow new NSS filenames
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: rawhide
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1496560
TreeView+ depends on / blocked
 
Reported: 2017-09-27 19:13 UTC by Kai Engert (:kaie) (inactive account)
Modified: 2019-05-20 16:28 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-20 16:28:49 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Kai Engert (:kaie) (inactive account) 2017-09-27 19:13:23 UTC
When implementing bug 1496560, applications that use NSS defaults will create differently named files.

Today, NSS by default will create files named cert8.db, key3.db, secmod.db

After the change, it will use files named cert9.dn, key4.db, pkcs11.txt

Thanks to Hubert, who discovered that mod_nss apparently needs an adjustment to selinux rules.

I suggest to search the existing selinux policies, and for each application that is allowed to access the old filenames, please allow the new filenames, too.

I suggest to add (not replace), in case an application needs to explicitly choose to continue to use the old filenames by configuration.

Comment 1 Lukas Vrabec 2017-09-29 10:22:26 UTC
Kai, 

Could you provide some list of renamed files? 

Thanks,
Lukas.

Comment 2 Kai Engert (:kaie) (inactive account) 2017-09-29 11:44:11 UTC
Lukas, the information from my initial comment is all I have.
Could you just search through the lists of files your policy already has?

In my opinion, you shouldn't wait for someone to report these files. I think it would be better if you're proactive and handle all existing scenarios that match my description.

Comment 3 Kai Engert (:kaie) (inactive account) 2017-10-20 14:56:28 UTC
FYI, I'd like to make the change to NSS next week.

Comment 4 Lukas Vrabec 2017-10-22 13:19:48 UTC
Kai, 

Are you able to create scratch build and test it with current selinux-policy in rawhide and attach here AVCs? 

Thanks,
Lukas.

Comment 6 Kai Engert (:kaie) (inactive account) 2017-10-23 18:11:08 UTC
(In reply to Lukas Vrabec from comment #4)
> Are you able to create scratch build and test it with current selinux-policy
> in rawhide and attach here AVCs? 

I cannot provide any Fedora failures yet.

Why can't we simply search the existing policies for these filenames, as I suggested in my initial comment?

Comment 16 Fedora End Of Life 2018-02-20 15:27:26 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle.
Changing version to '28'.

Comment 17 Ben Cotton 2019-05-02 19:35:44 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. 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 '28'.

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 28 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 18 Rob Crittenden 2019-05-02 20:14:39 UTC
I think this can probably be closed. The issue was related to migration from a DBM to sqlite NSS database(s). mod_nss will detect what is there and not try to automatically migrate so I don't think this will every cause SELinux issues.

I don't recall any user reports of issues in the F28 life cycle.

Comment 19 Hubert Kario 2019-05-03 12:30:54 UTC
DBM format will be deprecated in NSS and it will cause NSS to automatically migrate the files to the new format, so no, SELinux needs to be updated

Comment 20 Lukas Vrabec 2019-05-06 16:37:33 UTC
Hubert, 

What exactly should be fixed on SELinux side? If you point me to some SELinux denials that would be great.

Thanks,
Lukas.

Comment 21 Hubert Kario 2019-05-07 11:30:03 UTC
I don't have SELinux denials, but I can tell you that all SELinux references to files cert8.db, key3.db and secmod.db will need to be updated to include cert9.db, key4.db and pkcs11.txt, in addition.

Given the bug is still in ASSIGNED, my understanding is that it still hasn't happened. If this has already happened, this can be closed and sorry for the noise.

Comment 22 Lukas Vrabec 2019-05-15 10:56:24 UTC
Hi Hubert, 

Using latest Fedora Rawhide compose I see files cert9.db, pkcs11.txt and key4.db in directory "/etc/pki/nssdb":

# ls -Z /etc/pki/nssdb/
system_u:object_r:cert_t:s0 cert8.db  system_u:object_r:cert_t:s0 key4.db
system_u:object_r:cert_t:s0 cert9.db  system_u:object_r:cert_t:s0 pkcs11.txt
system_u:object_r:cert_t:s0 key3.db   system_u:object_r:cert_t:s0 secmod.db


Labels for files you mentioned is cert_t, which is correct from my POV. I think this issue is already fixed.

Comment 23 Hubert Kario 2019-05-15 11:20:16 UTC
and all applications that use nss have permission to *write* cert_t files?

Comment 24 Lukas Vrabec 2019-05-17 20:12:39 UTC
Hubert, 

If I provide scratch build, will you test it with some common apps using nss? 

Thanks,
Lukas.

Comment 25 Hubert Kario 2019-05-20 10:13:46 UTC
sorry, no, I won't

Comment 26 Lukas Vrabec 2019-05-20 16:28:49 UTC
After discussion with Hubert, we agreed to close this BZ because we don't have real example to test it. If anyone hit this issue with reproducer feel free to re-open this bug.


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