Bug 1802423 - SELinux is preventing pcscd from using the 'setsched' accesses on a process.
Summary: SELinux is preventing pcscd from using the 'setsched' accesses on a process.
Keywords:
Status: CLOSED DUPLICATE of bug 1795524
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: rawhide
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:8f3a89dfe201993f4f818617e1f...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-13 06:02 UTC by Matt Fagnani
Modified: 2020-04-27 09:14 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-02-13 06:59:58 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Matt Fagnani 2020-02-13 06:02:05 UTC
Description of problem:
I was using Fedora 32 KDE Plasma spin installation fully updated to 2020-2-13. I updated to glib2-2.63.5-3.fc32.x86_64 from koji with 
sudo dnf upgrade https://kojipkgs.fedoraproject.org//packages/glib2/2.63.5/3.fc32/x86_64/glib2-2.63.5-3.fc32.x86_64.rpm https://kojipkgs.fedoraproject.org//packages/glib2/2.63.5/3.fc32/x86_64/glib2-devel-2.63.5-3.fc32.x86_64.rpm

pcscd was denied setsched and sys_nice one or two times each during the next three boots when pcscd was being started. 
type=AVC msg=audit(1581573180.576:516): avc:  denied  { setsched } for  pid=2831 comm="pcscd" scontext=system_u:system_r:pcscd_t:s0 tcontext=system_u:system_r:pcscd_t:s0 tclass=process permissive=0
type=AVC msg=audit(1581572534.982:473): avc:  denied  { sys_nice } for  pid=2227 comm="pcscd" capability=23  scontext=system_u:system_r:pcscd_t:s0 tcontext=system_u:system_r:pcscd_t:s0 tclass=capability permissive=0

I hadn't seen these pcscd denials before the glib2-2.63.5-3.fc32.x86_64 update. pcscd didn't crash after being sent the trap signal as happened with 
ModemManager https://bugzilla.redhat.com/show_bug.cgi?id=1794958
accounts-daemon https://bugzilla.redhat.com/show_bug.cgi?id=1794959
colord https://bugzilla.redhat.com/show_bug.cgi?id=1794961

I reported more information about the reasons for those denials and crashes at https://bugzilla.redhat.com/show_bug.cgi?id=1794964
The pcscd denials are likely related to those reported at https://bugzilla.redhat.com/show_bug.cgi?id=1795524



SELinux is preventing pcscd from using the 'setsched' accesses on a process.

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

If you believe that pcscd should be allowed setsched access on processes labeled pcscd_t 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:
# ausearch -c 'pcscd' --raw | audit2allow -M my-pcscd
# semodule -X 300 -i my-pcscd.pp

Additional Information:
Source Context                system_u:system_r:pcscd_t:s0
Target Context                system_u:system_r:pcscd_t:s0
Target Objects                Unknown [ process ]
Source                        pcscd
Source Path                   pcscd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.5-24.fc32.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 5.6.0-0.rc1.git0.1.fc32.x86_64 #1
                              SMP Mon Feb 10 16:14:51 UTC 2020 x86_64 x86_64
Alert Count                   5
First Seen                    2020-02-12 23:31:19 EST
Last Seen                     2020-02-13 00:42:14 EST
Local ID                      b959638c-4045-44ba-9f94-912819b47dd9

Raw Audit Messages
type=AVC msg=audit(1581572534.982:474): avc:  denied  { setsched } for  pid=2227 comm="pcscd" scontext=system_u:system_r:pcscd_t:s0 tcontext=system_u:system_r:pcscd_t:s0 tclass=process permissive=0


Hash: pcscd,pcscd_t,pcscd_t,process,setsched

Version-Release number of selected component:
selinux-policy-3.14.5-24.fc32.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.12.0
hashmarkername: setroubleshoot
kernel:         5.6.0-0.rc1.git0.1.fc32.x86_64
type:           libreport

Comment 1 Zdenek Pytela 2020-02-13 06:59:58 UTC

*** This bug has been marked as a duplicate of bug 1795524 ***


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