Bug 1284492 - SELinux is preventing /usr/bin/certutil from 'read' accesses on the file /etc/pki/ca-trust/source/anchors/RH-IT-Root-CA.crt.
Summary: SELinux is preventing /usr/bin/certutil from 'read' accesses on the file /etc...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: setroubleshoot
Version: 22
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Petr Lautrbach
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:dbfda834f5f4261c744ae48ca5c...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-23 13:31 UTC by Eric Blake
Modified: 2016-07-19 18:31 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-19 18:31:13 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Eric Blake 2015-11-23 13:31:01 UTC
Description of problem:
SELinux is preventing /usr/bin/certutil from 'read' accesses on the file /etc/pki/ca-trust/source/anchors/RH-IT-Root-CA.crt.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that certutil should be allowed read access on the RH-IT-Root-CA.crt file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep certutil /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:certwatch_t:s0-s0:c0.c1023
Target Context                unconfined_u:object_r:user_home_t:s0
Target Objects                /etc/pki/ca-trust/source/anchors/RH-IT-Root-CA.crt
                              [ file ]
Source                        certutil
Source Path                   /usr/bin/certutil
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           crypto-utils-2.4.1-57.fc22.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-128.18.fc22.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.2.6-200.fc22.x86_64 #1 SMP Tue
                              Nov 10 16:45:19 UTC 2015 x86_64 x86_64
Alert Count                   124
First Seen                    2015-11-07 03:29:01 MST
Last Seen                     2015-11-23 03:39:02 MST
Local ID                      72d2bd77-5e57-47d2-a82f-bbfae820983b

Raw Audit Messages
type=AVC msg=audit(1448275142.674:703): avc:  denied  { read } for  pid=7730 comm="certwatch" name="RH-IT-Root-CA.crt" dev="dm-1" ino=940383 scontext=system_u:system_r:certwatch_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=0


type=SYSCALL msg=audit(1448275142.674:703): arch=x86_64 syscall=open success=no exit=EACCES a0=18a1210 a1=80000 a2=18 a3=7ffc4960cbb0 items=0 ppid=7700 pid=7730 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=certwatch exe=/usr/bin/certwatch subj=system_u:system_r:certwatch_t:s0-s0:c0.c1023 key=(null)

Hash: certutil,certwatch_t,user_home_t,file,read

Version-Release number of selected component:
selinux-policy-3.13.1-128.18.fc22.noarch

Additional info:
reporter:       libreport-2.6.3
hashmarkername: setroubleshoot
kernel:         4.2.6-200.fc22.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2015-11-23 15:01:25 UTC
Hi, 
You probably move crt file from your homedir. This caused that crt file has bad SELinux context.

Use:
#restorecon -v /etc/pki/ca-trust/source/anchors/RH-IT-Root-CA.crt

Comment 2 Eric Blake 2015-11-23 15:46:34 UTC
Then isn't this a bug in the selinux troubleshooter gui, for not offering that as a suggestion?  Usually, when I hit a SELinux problem that pops up the troubleshooting gui, there are two choices - report the bug, or run this canned command to fix the context.  But for this one, there was no option to run a canned command.

Comment 3 Fedora End Of Life 2016-07-19 18:31:13 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 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.


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