Bug 2355930

Summary: SELinux is preventing (pcscd) from using the 'nnp_transition' accesses on a process.
Product: [Fedora] Fedora Reporter: Zephyr Lykos <fedora>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dwalsh, fedora, lvrabec, mikhail.v.gavrilov, mmalik, omosnacek, pkoncity, vmojzis, zpytela
Target Milestone: ---Flags: zpytela: mirror+
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:90dae7b4519e7ca500f820180016cfd44da6f2ce9a34f2d6b3d9e08567312b6b;VARIANT_ID=workstation;
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-04-08 19:17:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: description
none
File: os_info none

Description Zephyr Lykos 2025-03-29 12:32:33 UTC
Description of problem:
1. systemctl enable pcscd.service --now
2. plug in Yubikey, `gpg --sign` with it
3. see AVC denial
SELinux is preventing (pcscd) from using the 'nnp_transition' accesses on a process.

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

If you believe that (pcscd) should be allowed nnp_transition 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:init_t:s0
Target Context                system_u:system_r:pcscd_t:s0
Target Objects                Unknown [ process2 ]
Source                        (pcscd)
Source Path                   (pcscd)
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-41.34-1.fc43.noarch
Local Policy RPM              selinux-policy-targeted-41.34-1.fc43.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 6.14.0-
                              0.rc7.20250321gitb3ee1e460951.60.fc43.x86_64 #1
                              SMP PREEMPT_DYNAMIC Fri Mar 21 17:27:07 UTC 2025
                              x86_64
Alert Count                   8
First Seen                    2025-03-28 17:13:01 CST
Last Seen                     2025-03-29 20:19:21 CST
Local ID                      9169605e-1fd4-4c90-951c-3aaf884189dc

Raw Audit Messages
type=AVC msg=audit(1743250761.970:222): avc:  denied  { nnp_transition } for  pid=6605 comm="(pcscd)" scontext=system_u:system_r:init_t:s0 tcontext=system_u:system_r:pcscd_t:s0 tclass=process2 permissive=0


Hash: (pcscd),init_t,pcscd_t,process2,nnp_transition

Version-Release number of selected component:
selinux-policy-targeted-41.34-1.fc43.noarch

Additional info:
reporter:       libreport-2.17.15
reason:         SELinux is preventing (pcscd) from using the 'nnp_transition' accesses on a process.
package:        selinux-policy-targeted-41.34-1.fc43.noarch
component:      selinux-policy
hashmarkername: setroubleshoot
type:           libreport
kernel:         6.14.0-0.rc7.20250321gitb3ee1e460951.60.fc43.x86_64
component:      selinux-policy

Comment 1 Zephyr Lykos 2025-03-29 12:32:36 UTC
Created attachment 2082505 [details]
File: description

Comment 2 Zephyr Lykos 2025-03-29 12:32:38 UTC
Created attachment 2082506 [details]
File: os_info

Comment 3 Milos Malik 2025-04-03 08:38:29 UTC
I believe the problem is caused by the changes in the pcscd.service file:

# rpm -qa pcsc\* seli\* | sort
pcsc-lite-2.3.2-1.fc43.x86_64
pcsc-lite-ccid-1.6.2-1.fc43.x86_64
pcsc-lite-libs-2.3.2-1.fc43.x86_64
selinux-policy-41.35-1.fc43.noarch
selinux-policy-targeted-41.35-1.fc43.noarch
# grep -i nonew /usr/lib/systemd/system/pcscd.service 
NoNewPrivileges=yes
# sesearch -t pcscd_t -p nnp_transition -A
#

Comment 4 Zdenek Pytela 2025-04-03 10:52:39 UTC
*** Bug 2356058 has been marked as a duplicate of this bug. ***

Comment 5 Zdenek Pytela 2025-04-03 10:52:51 UTC
*** Bug 2357154 has been marked as a duplicate of this bug. ***