Additional info: libreport version: 2.0.14 kernel: 3.6.1-1.fc17.x86_64 description: :SELinux is preventing /usr/sbin/sshd from 'search' accesses on the directory /var/lib/pgsql. : :***** Plugin catchall (100. confidence) suggests *************************** : :If you believe that sshd should be allowed search access on the pgsql directory 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 sshd /var/log/audit/audit.log | audit2allow -M mypol :# semodule -i mypol.pp : :Additional Information: :Source Context system_u:system_r:sshd_t:s0-s0:c0.c1023 :Target Context system_u:object_r:postgresql_db_t:s0 :Target Objects /var/lib/pgsql [ dir ] :Source sshd :Source Path /usr/sbin/sshd :Port <Unknown> :Host (removed) :Source RPM Packages openssh-server-5.9p1-26.fc17.x86_64 :Target RPM Packages postgresql-server-9.1.6-1.fc17.x86_64 :Policy RPM selinux-policy-3.10.0-153.fc17.noarch :Selinux Enabled True :Policy Type targeted :Enforcing Mode Enforcing :Host Name (removed) :Platform Linux (removed) 3.6.1-1.fc17.x86_64 #1 SMP Wed Oct : 10 12:13:05 UTC 2012 x86_64 x86_64 :Alert Count 141 :First Seen 2012-06-25 20:55:41 BST :Last Seen 2012-10-19 21:20:30 BST :Local ID 9154d521-f877-485a-9955-4e62e303e587 : :Raw Audit Messages :type=AVC msg=audit(1350678030.344:6400): avc: denied { search } for pid=14552 comm="sshd" name="pgsql" dev="dm-5" ino=262426 scontext=system_u:system_r:sshd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:postgresql_db_t:s0 tclass=dir : : :type=SYSCALL msg=audit(1350678030.344:6400): arch=x86_64 syscall=stat success=no exit=EACCES a0=7f5da397c730 a1=7fff19253060 a2=7fff19253060 a3=6e6970706172772f items=0 ppid=1737 pid=14552 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=sshd exe=/usr/sbin/sshd subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 key=(null) : :Hash: sshd,sshd_t,postgresql_db_t,dir,search : :audit2allow : :#============= sshd_t ============== :allow sshd_t postgresql_db_t:dir search; : :audit2allow -R : :#============= sshd_t ============== :allow sshd_t postgresql_db_t:dir search; :
Created attachment 630656 [details] File: type
Created attachment 630658 [details] File: hashmarkername
Did you setup a ssh connection between a client and a PostgreSQL server?
No, I didn't. Or, at least, it's possible I connected to a uni ssh server that also runs PostgreSQL, but if I did, it certainly wasn't to do anything database-like. I'd just have been using it as a tunnel to another machine, which isn't running PostgreSQL. Is this another incoming attack?
Probably not, does posqresql have a homedir in /var/lib/pgsql?
grep pgsql /etc/passwd postgres:x:26:26:PostgreSQL Server:/var/lib/pgsql:/bin/bash I would bet sshd is just looking through homedirs as listed in /etc/passwd
We have a fix in Fedora18. Backported. commit b981ffd267bd981fd9ede1c6201eb2bb85e7bdd0 Author: Miroslav Grepl <mgrepl> Date: Mon Dec 10 11:16:29 2012 +0100 Label /var/lib/pgsql/.ssh as ssh_home_t
selinux-policy-3.10.0-165.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-165.fc17
Package selinux-policy-3.10.0-165.fc17: * should fix your issue, * was pushed to the Fedora 17 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.10.0-165.fc17' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-20544/selinux-policy-3.10.0-165.fc17 then log in and leave karma (feedback).
Package selinux-policy-3.10.0-166.fc17: * should fix your issue, * was pushed to the Fedora 17 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.10.0-166.fc17' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-20544/selinux-policy-3.10.0-166.fc17 then log in and leave karma (feedback).
selinux-policy-3.10.0-166.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.