From: Vasiliy Kulikov <segoon@openwall.com>
To: kernel-hardening@lists.openwall.com
Subject: Re: [kernel-hardening] How to temporary change 'current' (task)
Date: Fri, 17 Jun 2011 13:25:51 +0400 [thread overview]
Message-ID: <20110617092551.GA6959@albatros> (raw)
In-Reply-To: <20110617085951.GA7772@openwall.com>
On Fri, Jun 17, 2011 at 12:59 +0400, Solar Designer wrote:
> On Fri, Jun 17, 2011 at 12:36:51PM +0400, Vasiliy Kulikov wrote:
> > I wonder whether there is a simple way to temporary switch 'current' to
> > another task and then switch it back with minimum side effects?
>
> I strongly recommend that we don't. Doing so would introduce security
> risks similar to what we saw with set_fs(USER_DS). Even if you
> implement everything right and safely, you would set an extremely bad
> precedent, encouraging others to do risky things like that. Under the
> security hardening project, we should be moving the kernel away from
> those things, not introducing more of them.
Yes, you might be right, but it looks like the most simple solution. In
the netlink listeners case the task triggers a broadcast message (on
exec(), fork(), setuid(), etc.) and delivers the message to the
listeners. The official way to filter these messages (actually, skbs)
is providing a filter function to netlink_broadcast_filter(). This
filter would do ptrace_may_access()-like check. The check would be
processes in the context of the emmitter process (ptrace target).
Arbitrary filtering on the receivers' side looks technically rather
difficult and unreasonable to me and unlikely to be applied.
Much more simple, but dubious solution is disabling such netlink sockets
for unprivileged users. This would deny harmless process tracking for
the same user without any actual need.
Thanks,
--
Vasiliy
next prev parent reply other threads:[~2011-06-17 9:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-17 8:36 [kernel-hardening] How to temporary change 'current' (task) Vasiliy Kulikov
2011-06-17 8:59 ` Solar Designer
2011-06-17 9:25 ` Vasiliy Kulikov [this message]
2011-06-17 10:01 ` Vasiliy Kulikov
2011-06-17 10:11 ` Vasiliy Kulikov
2011-06-17 9:29 ` [kernel-hardening] " Peter Zijlstra
2011-06-17 9:56 ` Vasiliy Kulikov
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=20110617092551.GA6959@albatros \
--to=segoon@openwall.com \
--cc=kernel-hardening@lists.openwall.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox