Bug 666494 - SELinux is preventing /usr/bin/kleopatra from 'connectto' accesses on the unix_stream_socket /tmp/gpg-5VtZxQ/S.gpg-agent.
Summary: SELinux is preventing /usr/bin/kleopatra from 'connectto' accesses on the uni...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 14
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:bb1fa0c2b96...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-12-31 05:51 UTC by Christopher Antila
Modified: 2011-05-04 08:30 UTC (History)
3 users (show)

Fixed In Version: selinux-policy-3.9.7-20.fc14
Clone Of:
Environment:
Last Closed: 2011-01-17 20:52:13 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Christopher Antila 2010-12-31 05:51:01 UTC
SELinux is preventing /usr/bin/kleopatra from 'connectto' accesses on the unix_stream_socket /tmp/gpg-5VtZxQ/S.gpg-agent.

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

If you believe that kleopatra should be allowed connectto access on the S.gpg-agent unix_stream_socket 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 /usr/bin/kleopatra /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                user_u:user_r:user_t:s0
Target Context                user_u:user_r:gpg_agent_t:s0
Target Objects                /tmp/gpg-5VtZxQ/S.gpg-agent [ unix_stream_socket ]
Source                        kleopatra
Source Path                   /usr/bin/kleopatra
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           kdepim-4.4.8-1.fc14
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.7-19.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.35.10-74.fc14.x86_64 #1 SMP
                              Thu Dec 23 16:04:50 UTC 2010 x86_64 x86_64
Alert Count                   11
First Seen                    Wed 29 Dec 2010 05:25:25 PM EST
Last Seen                     Fri 31 Dec 2010 12:47:47 AM EST
Local ID                      10364ade-9bac-4563-b77a-4552a20ce64d

Raw Audit Messages
type=AVC msg=audit(1293774467.13:22752): avc:  denied  { connectto } for  pid=2557 comm="kleopatra" path="/tmp/gpg-5VtZxQ/S.gpg-agent" scontext=user_u:user_r:user_t:s0 tcontext=user_u:user_r:gpg_agent_t:s0 tclass=unix_stream_socket

kleopatra,user_t,gpg_agent_t,unix_stream_socket,connectto
type=SYSCALL msg=audit(1293774467.13:22752): arch=x86_64 syscall=connect success=yes exit=0 a0=14 a1=7fffbaab8d70 a2=1d a3=4 items=0 ppid=2556 pid=2557 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 tty=(none) ses=1 comm=kleopatra exe=/usr/bin/kleopatra subj=user_u:user_r:user_t:s0 key=(null)
kleopatra,user_t,gpg_agent_t,unix_stream_socket,connectto

#============= user_t ==============
allow user_t gpg_agent_t:unix_stream_socket connectto;

Comment 1 Miroslav Grepl 2011-01-03 15:18:23 UTC
It should block nothing. Does everything work?

Comment 2 Christopher Antila 2011-01-03 19:08:07 UTC
All of the functionality that I use seems to work either way, but I don't make extensive use of Kleopatra. When SELinux blocks access to gpg-agent, Kleopatra reports an error during the self-test on application start-up. Furthermore, I don't remember encountering this error when running as a default unconfined_u user.

From an SELinux perspective, you probably don't want to allow this, since it isn't necessary. Should I take this bug to the Kleopatra developers, and ask that, if gpg-agent is the only self-test item that fails, it shouldn't trigger the warning to pop up? Assuming, of course, that everything does work...

Comment 3 Daniel Walsh 2011-01-03 20:11:06 UTC
Miroslav, I think we should allow it.

	allow $2 gpg_agent_t:unix_stream_socket { rw_socket_perms connectto };


In gpg_role.

Comment 4 Miroslav Grepl 2011-01-04 14:09:25 UTC
Fixed in selinux-policy-3.9.7-20.fc14

Comment 5 Fedora Update System 2011-01-04 18:01:16 UTC
selinux-policy-3.9.7-20.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/selinux-policy-3.9.7-20.fc14

Comment 6 Fedora Update System 2011-01-05 21:21:52 UTC
selinux-policy-3.9.7-20.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update selinux-policy'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/selinux-policy-3.9.7-20.fc14

Comment 7 Fedora Update System 2011-01-17 20:51:22 UTC
selinux-policy-3.9.7-20.fc14 has been pushed to the Fedora 14 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.