From: Vasiliy Kulikov <segoon@openwall.com>
To: Balbir Singh <bsingharora@gmail.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
linux-kernel@vger.kernel.org, balbir@linux.vnet.ibm.com,
akpm@linux-foundation.org, viro@zeniv.linux.org.uk,
rientjes@google.com, wilsons@start.ca, security@kernel.org,
eparis@redhat.com, kernel-hardening@lists.openwall.com,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH 1/2] proc: restrict access to /proc/PID/io
Date: Tue, 28 Jun 2011 11:50:53 +0400 [thread overview]
Message-ID: <20110628075053.GA4009@albatros> (raw)
In-Reply-To: <BANLkTimFkb1TK_u+Xqp6LnRgzMAv21jFHg@mail.gmail.com>
On Tue, Jun 28, 2011 at 06:54 +0530, Balbir Singh wrote:
> > As to rounding - this is a workaround, not a fix. What if some program
> > reads one byte from tty and then do some io activity exactly of 1kb-1?
> > Then you just measure kbs and get original tty activity. (just a crazy
> > example to show that it is not a full solution.)
> >
>
> That would happen with a probability of 1/1024
I'd not claim about probability here, but anyway rounding would be not
a fix, just a workaround. Also note that the random value is program
dependent, it is not chosen at the program start time or anything
similar. IOW, if the program is vulnerable, it is vulnerable with 100%
probability.
> >> > Also I'm worried about these statistics after dropping the privileges.
> >> > After setuid() and similar things not changing pid unprivileged user
> >> > gets some information about the previous io activity of this task being
> >> > privileged. In some situations it doesn't reveal any sensitive
> >> > information, in some it might. Clearing taskstats on credential
> >> > changing functions would totally break taskstats' interfaces; and should
> >> > be temporary changing fsuid/euid followed by reverting it considered
> >> > harmfull? I don't know.
> >>
> >> Can you please explain more? I'm feeling "reset at credential change" is
> >> reasonable idea. How broken is there?
> >
> > In the code I see taskstats statistics is kept untouched, so it would
> > break userspace assumptions about the statistics.
> >
>
> Could you please elaborate on this point?
It's better to consider my phrase as a question :) Like this: don't
userspace programs rely on the fact that all statistic information
wouldn't be cleared after execve()/set*id()/prctl() ? I'm not familiar
with taskstats at all, so I don't know whether this assumption makes
sense to userspace application.
Thanks,
--
Vasiliy Kulikov
http://www.openwall.com - bringing security into open computing environments
next prev parent reply other threads:[~2011-06-28 7:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-24 12:08 [PATCH 1/2] proc: restrict access to /proc/PID/io Vasiliy Kulikov
2011-06-27 2:58 ` KOSAKI Motohiro
2011-06-27 7:03 ` Vasiliy Kulikov
2011-06-27 7:33 ` KOSAKI Motohiro
2011-06-27 8:52 ` Vasiliy Kulikov
2011-06-27 10:07 ` KOSAKI Motohiro
2011-06-27 10:59 ` Vasiliy Kulikov
2011-06-27 22:37 ` Solar Designer
2011-06-28 1:24 ` Balbir Singh
2011-06-28 7:50 ` Vasiliy Kulikov [this message]
2011-06-29 1:16 ` Balbir Singh
2011-06-29 11:20 ` Vasiliy Kulikov
2011-06-28 1:13 ` Balbir Singh
2011-06-28 1:15 ` Balbir Singh
2011-06-28 7:50 ` 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=20110628075053.GA4009@albatros \
--to=segoon@openwall.com \
--cc=akpm@linux-foundation.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=bsingharora@gmail.com \
--cc=eparis@redhat.com \
--cc=kernel-hardening@lists.openwall.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rientjes@google.com \
--cc=security@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
--cc=wilsons@start.ca \
/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