From: Dale Amon <amon@vnl.com>
To: Russell Coker <russell@coker.com.au>
Cc: Dale Amon <amon@vnl.com>, SELinux Mail List <selinux@tycho.nsa.gov>
Subject: Re: ssh policy hassles
Date: Thu, 25 Sep 2003 11:44:57 +0100 [thread overview]
Message-ID: <20030925104456.GD10234@vnl.com> (raw)
In-Reply-To: <200309251332.53496.russell@coker.com.au>
On Thu, Sep 25, 2003 at 01:32:53PM +1000, Russell Coker wrote:
> On Thu, 25 Sep 2003 06:31, Dale Amon wrote:
> > avc: denied { search } for pid=654 exe=/usr/sbin/sshd dev=sda2
> > ino=903169 scontext=system_u:system_r:sshd_t
> > tcontext=system_u:object_r:var_lib_t tclass=dir
>
> What is in /etc/passwd for the sshd account?
>
> > The only thing I see that looks even vaguely like a possible
> > target there is /var/lib/urandom.
>
> That's not something that sshd should be accessing.
>
> Does sshd work well without the access? If so then a dontaudit rule is in
> order.
>
> > Okay, now I've still one more, and this one is really
> > confusing because ino=48726022 seems not to exist:
> >
> > 48726022 <inode not found>
> >
> > I half wonder if I've got a bad link somewhere. It would
> > be easy enough to add an allow for this, but I'd like
> > to figure out why rather than blindly add things.
> >
> > avc: denied { read } for pid=743 exe=/usr/sbin/sshd dev= ino=48726022
> > scontext=system_u:system_r:sshd_t tcontext=system_u:system_r:sshd_t
> > tclass=lnk_file
>
> When you see that a domain is listed as the target (sshd_t is the tcontext)
> for a file/dir/link_file access then it's an access to /proc/pid . In this
> case it's probably access to /proc/self/cwd or something. In my latest
> policy I have the following:
> dontaudit sshd_t proc_t:dir search;
I'll try adding that. However something is still very wrong here. From
log/auth on the selinux host when in enforcing mode (yes it works when not):
Sep 25 11:40:26 cvs ssh(pam_unix)[394]: authentication failure; logname= uid=0 euid=0 tty=NODEVssh ruser= rhost=10.0.0.25 user=root
Sep 25 11:40:32 cvs sshd[394]: Accepted password for root from 10.0.0.25 port 1160 ssh2
Sep 25 11:40:32 cvs sshd[394]: default security context is root:staff_r:staff_t
Sep 25 11:40:32 cvs sshd[394]: setting tty /dev/pts/2 context to root:object_r:staff_devpts_t
Sep 25 11:40:32 cvs sshd[394]: fatal: chown(/dev/pts/2, 0, 5) failed: Permission denied
Sep 25 11:40:32 cvs sshd[394]: error: chown /dev/pts/2 0 0 failed: Permission denied
Sep 25 11:40:32 cvs sshd[394]: error: chmod /dev/pts/2 0666 failed: Permission denied
and these are the corresponding avcs:
avc: denied { read } for pid=394 exe=/usr/sbin/sshd dev= ino=25853959 scontext=system_u:system_r:sshd_t tcontext=system_u:system_r:sshd_t tclass=lnk_file
I'm starting to wonder if this has anything to do with the
2.6.0 devpts filesystem?
rootfs / rootfs rw 0 0
/dev2/root2 / ext3 rw 0 0
none /selinux selinuxfs rw 0 0
proc /proc proc rw 0 0
devpts /dev/pts devpts rw 0 0
/dev/sdb1 /home/cvs reiserfs rw 0 0
/dev/sdc1 /disk2 reiserfs rw 0 0
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
next prev parent reply other threads:[~2003-09-25 10:45 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-23 15:09 Some minor thoughts on syntax/semantics Dale Amon
2003-09-23 23:47 ` Brian May
2003-09-24 13:34 ` Russell Coker
2003-09-24 15:17 ` Dale Amon
2003-09-24 20:31 ` ssh policy hassles Dale Amon
2003-09-24 21:20 ` Kerry Thompson
2003-09-25 3:32 ` Russell Coker
2003-09-25 10:44 ` Dale Amon [this message]
2003-09-25 11:31 ` Dale Amon
2003-09-25 12:17 ` Dale Amon
2003-09-25 12:21 ` Russell Coker
2003-09-25 12:55 ` Stephen Smalley
2003-09-25 14:20 ` Dale Amon
2003-09-27 10:47 ` Dale Amon
[not found] ` <20030927133244.GC22582@vnl.com>
[not found] ` <20030927133352.GD22582@vnl.com>
2003-09-27 14:13 ` Russell Coker
2003-09-27 23:00 ` Dale Amon
-- strict thread matches above, loose matches on Subject: below --
2003-09-24 21:55 Inger, Slav (S.B.)
2003-09-24 22:11 ` Dale Amon
2003-09-24 22:27 ` Dale Amon
2003-09-25 3:01 ` Diyab
2003-09-25 8:30 ` Dale Amon
2003-09-25 6:46 ` Tom
2003-09-25 8:14 ` Russell Coker
2003-09-25 10:29 ` Dale Amon
2003-09-25 12:55 ` Diyab
2003-09-25 16:47 ` Russell Coker
2003-09-26 0:16 ` Diyab
2003-09-26 2:42 ` Russell Coker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030925104456.GD10234@vnl.com \
--to=amon@vnl.com \
--cc=russell@coker.com.au \
--cc=selinux@tycho.nsa.gov \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.