Bug 1342945 - SELinux is preventing /usr/bin/ssh from 'write' accesses on the sock_file S.gpg-agent.ssh.
Summary: SELinux is preventing /usr/bin/ssh from 'write' accesses on the sock_file S.g...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 24
Hardware: x86_64
OS: Unspecified
high
medium
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:d1ec3a93e49659d4527a4e360f0...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-06 08:07 UTC by Petr Lautrbach
Modified: 2017-08-08 14:46 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-08 14:46:03 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Petr Lautrbach 2016-06-06 08:07:54 UTC
Description of problem:
I use gpg-agent as an ssh agent:

staff_u:staff_r:gpg_agent_t:s0   2818 ?        Ss     0:00 gpg-agent --homedir /home/plautrba/.gnupg --use-standard-socket --daemon

and I've tried to log in to a remote box using an ssh key stored in gpg agent.
SELinux is preventing /usr/bin/ssh from 'write' accesses on the sock_file S.gpg-agent.ssh.

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

If you believe that ssh should be allowed write access on the S.gpg-agent.ssh sock_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:
# ausearch -c 'ssh' --raw | audit2allow -M my-ssh
# semodule -X 300 -i my-ssh.pp

Additional Information:
Source Context                staff_u:staff_r:ssh_t:s0
Target Context                staff_u:object_r:gpg_secret_t:s0
Target Objects                S.gpg-agent.ssh [ sock_file ]
Source                        ssh
Source Path                   /usr/bin/ssh
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           openssh-clients-7.2p2-6.fc24.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-190.fc24.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.5.6-300.fc24.x86_64 #1 SMP Wed
                              Jun 1 21:29:58 UTC 2016 x86_64 x86_64
Alert Count                   1
First Seen                    2016-06-06 10:03:24 CEST
Last Seen                     2016-06-06 10:03:24 CEST
Local ID                      603e0c2e-a883-4916-abc6-0db94c5368be

Raw Audit Messages
type=AVC msg=audit(1465200204.254:438): avc:  denied  { write } for  pid=13958 comm="ssh" name="S.gpg-agent.ssh" dev="dm-3" ino=3417104 scontext=staff_u:staff_r:ssh_t:s0 tcontext=staff_u:object_r:gpg_secret_t:s0 tclass=sock_file permissive=0


type=SYSCALL msg=audit(1465200204.254:438): arch=x86_64 syscall=connect success=no exit=EACCES a0=4 a1=7ffd2aa54b70 a2=6e a3=7fd38e8bc200 items=1 ppid=7982 pid=13958 auid=13558 uid=13558 gid=13558 euid=13558 suid=13558 fsuid=13558 egid=13558 sgid=13558 fsgid=13558 tty=pts3 ses=1 comm=ssh exe=/usr/bin/ssh subj=staff_u:staff_r:ssh_t:s0 key=(null)

Hash: ssh,ssh_t,gpg_secret_t,sock_file,write

Version-Release number of selected component:
selinux-policy-3.13.1-190.fc24.noarch

Additional info:
reporter:       libreport-2.7.1
hashmarkername: setroubleshoot
kernel:         4.5.6-300.fc24.x86_64
reproducible:   Not sure how to reproduce the problem
type:           libreport

Comment 1 Fedora End Of Life 2017-07-25 21:01:07 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 2 Fedora End Of Life 2017-08-08 14:46:03 UTC
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 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.