Bug 989701 - SELinux is preventing /usr/libexec/gnupg-pcsc-wrapper from 'write' accesses on the sock_file pcscd.comm.
SELinux is preventing /usr/libexec/gnupg-pcsc-wrapper from 'write' accesses o...
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-07-29 14:20 EDT by Garrett Holmstrom
Modified: 2013-08-14 22:54 EDT (History)
3 users (show)

See Also:
Fixed In Version: selinux-policy-3.11.1-100.fc18
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-08-14 22:54:45 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Garrett Holmstrom 2013-07-29 14:20:18 EDT
Description of problem:
This popped up while I was using gnupg2 and friends to program a USB PGP token.
SELinux is preventing /usr/libexec/gnupg-pcsc-wrapper from 'write' accesses on the sock_file pcscd.comm.

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

If you believe that gnupg-pcsc-wrapper should be allowed write access on the pcscd.comm sock_file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
allow this access for now by executing:
# grep gnupg-pcsc-wrap /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                staff_u:staff_r:gpg_agent_t:s0-s0:c0.c1023
Target Context                system_u:object_r:pcscd_var_run_t:s0
Target Objects                pcscd.comm [ sock_file ]
Source                        gnupg-pcsc-wrap
Source Path                   /usr/libexec/gnupg-pcsc-wrapper
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           gnupg2-2.0.19-7.fc18.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-97.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.9.6-200.fc18.x86_64 #1 SMP Thu
                              Jun 13 18:56:55 UTC 2013 x86_64 x86_64
Alert Count                   7
First Seen                    2013-07-23 18:06:44 PDT
Last Seen                     2013-07-23 19:28:38 PDT
Local ID                      db418b96-6b81-4829-9fa5-bdcf05df4a73

Raw Audit Messages
type=AVC msg=audit(1374632918.71:4678): avc:  denied  { write } for  pid=25457 comm="gnupg-pcsc-wrap" name="pcscd.comm" dev="tmpfs" ino=16233 scontext=staff_u:staff_r:gpg_agent_t:s0-s0:c0.c1023 tcontext=system_u:object_r:pcscd_var_run_t:s0 tclass=sock_file

type=AVC msg=audit(1374632918.71:4678): avc:  denied  { connectto } for  pid=25457 comm="gnupg-pcsc-wrap" path="/run/pcscd/pcscd.comm" scontext=staff_u:staff_r:gpg_agent_t:s0-s0:c0.c1023 tcontext=system_u:system_r:pcscd_t:s0 tclass=unix_stream_socket

type=SYSCALL msg=audit(1374632918.71:4678): arch=x86_64 syscall=connect success=yes exit=0 a0=3 a1=7fffeb795260 a2=1c a3=7fffeb794fe0 items=0 ppid=1 pid=25457 auid=1000 uid=1000 gid=100 euid=1000 suid=1000 fsuid=1000 egid=100 sgid=100 fsgid=100 ses=2 tty=(none) comm=gnupg-pcsc-wrap exe=/usr/libexec/gnupg-pcsc-wrapper subj=staff_u:staff_r:gpg_agent_t:s0-s0:c0.c1023 key=(null)

Hash: gnupg-pcsc-wrap,gpg_agent_t,pcscd_var_run_t,sock_file,write


#============= gpg_agent_t ==============
allow gpg_agent_t pcscd_t:unix_stream_socket connectto;
allow gpg_agent_t pcscd_var_run_t:sock_file write;

audit2allow -R
require {
	type gpg_agent_t;

#============= gpg_agent_t ==============

Additional info:
reporter:       libreport-2.1.5
hashmarkername: setroubleshoot
kernel:         3.9.11-200.fc18.x86_64
type:           libreport
Comment 1 Daniel Walsh 2013-07-29 15:02:21 EDT
4650022612c52918ac8ad9910ee153894d029d08 allows this in git.
Comment 2 Fedora Update System 2013-08-05 01:41:35 EDT
selinux-policy-3.11.1-99.fc18 has been submitted as an update for Fedora 18.
Comment 3 Fedora Update System 2013-08-05 20:15:12 EDT
Package selinux-policy-3.11.1-99.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.11.1-99.fc18'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 4 Fedora Update System 2013-08-07 07:13:21 EDT
selinux-policy-3.11.1-100.fc18 has been submitted as an update for Fedora 18.
Comment 5 Fedora Update System 2013-08-14 22:54:45 EDT
selinux-policy-3.11.1-100.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

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