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: Wed, 29 Jun 2011 15:20:45 +0400 [thread overview]
Message-ID: <20110629112045.GA29011@albatros> (raw)
In-Reply-To: <BANLkTimBMz8onkYDsz6D_An7q0k0wZVyUw@mail.gmail.com>
On Wed, Jun 29, 2011 at 06:46 +0530, Balbir Singh wrote:
> On Tue, Jun 28, 2011 at 1:20 PM, Vasiliy Kulikov <segoon@openwall.com> wrote:
> > 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.
> >
>
> I was thinking along ASLR lines, ASLR reduces the probability of
> malware finding specific address in code, but does not eliminate it
> completely.
You confuse a bug fix with a prevention of an exploitation technique
here. ASLR doesn't fix anything, it tries to break exploits that use
bugs like arbitrary writes/reads. If there is arbitrary write bug,
almost always the game is over; that's why such probabilistic measure is
acceptable. On the contrary, /proc/*/io leak is a bug, which is fairly
fixable by restricting an access (breaking programs, though). So, from
the security point of view these cases are not comparable.
> In the worst case as you suggest may
> be the statistics would be available only to root, but that is the
> final drop down scenario.
Yes, it breaks iotop, but it is a full solution.
> No we don't clear taskstats info on credential changes.
If taskstats info is allowed to travel through credential changes, it
exposes the similar private information.
Thanks,
--
Vasiliy Kulikov
http://www.openwall.com - bringing security into open computing environments
next prev parent reply other threads:[~2011-06-29 11:20 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
2011-06-29 1:16 ` Balbir Singh
2011-06-29 11:20 ` Vasiliy Kulikov [this message]
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=20110629112045.GA29011@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