From: Dave Hansen <dave@linux.vnet.ibm.com>
To: Vasiliy Kulikov <segoon@openwall.com>
Cc: David Rientjes <rientjes@google.com>,
Christoph Lameter <cl@gentwo.org>,
kernel-hardening@lists.openwall.com,
Pekka Enberg <penberg@kernel.org>, Matt Mackall <mpm@selenic.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, Kees Cook <kees@ubuntu.com>,
Valdis.Kletnieks@vt.edu,
Linus Torvalds <torvalds@linux-foundation.org>,
Alan Cox <alan@linux.intel.com>,
linux-kernel@vger.kernel.org
Subject: [kernel-hardening] Re: [PATCH 2/2] mm: restrict access to /proc/meminfo
Date: Thu, 29 Sep 2011 09:30:36 -0700 [thread overview]
Message-ID: <1317313836.16137.620.camel@nimitz> (raw)
In-Reply-To: <20110929161848.GA16348@albatros>
On Thu, 2011-09-29 at 20:18 +0400, Vasiliy Kulikov wrote:
> I'm not convinced with rounding the information to MBs. The attacker
> still may fill slabs with new objects to trigger new slab pages
> allocations. He will be able to see when this MB-granularity barrier is
> overrun thus seeing how many kbs there were before:
>
> old = new - filled_obj_size_sum
>
> As `new' is just increased, it means it is known with KB granularity,
> not MB. By counting used slab objects he learns filled_obj_size_sum.
>
> So, rounding gives us nothing, but obscurity.
I'll agree that it doesn't fundamentally fix anything. But, it does
make an attack more difficult in the real world. There's a reason that
real-world attackers are going after slabinfo: it's a fundamentally
*BETTER* than meminfo as a tool with which to aim an attack. A
MB-rounded meminfo is also fundamentally *BETTER* than a
PAGE_SIZE-rounded meminfo. I find it hard to call this "nothing".
Anyway... I'm working on a patch. Will post soon.
-- Dave
WARNING: multiple messages have this Message-ID (diff)
From: Dave Hansen <dave@linux.vnet.ibm.com>
To: Vasiliy Kulikov <segoon@openwall.com>
Cc: David Rientjes <rientjes@google.com>,
Christoph Lameter <cl@gentwo.org>,
kernel-hardening@lists.openwall.com,
Pekka Enberg <penberg@kernel.org>, Matt Mackall <mpm@selenic.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, Kees Cook <kees@ubuntu.com>,
Valdis.Kletnieks@vt.edu,
Linus Torvalds <torvalds@linux-foundation.org>,
Alan Cox <alan@linux.intel.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] mm: restrict access to /proc/meminfo
Date: Thu, 29 Sep 2011 09:30:36 -0700 [thread overview]
Message-ID: <1317313836.16137.620.camel@nimitz> (raw)
In-Reply-To: <20110929161848.GA16348@albatros>
On Thu, 2011-09-29 at 20:18 +0400, Vasiliy Kulikov wrote:
> I'm not convinced with rounding the information to MBs. The attacker
> still may fill slabs with new objects to trigger new slab pages
> allocations. He will be able to see when this MB-granularity barrier is
> overrun thus seeing how many kbs there were before:
>
> old = new - filled_obj_size_sum
>
> As `new' is just increased, it means it is known with KB granularity,
> not MB. By counting used slab objects he learns filled_obj_size_sum.
>
> So, rounding gives us nothing, but obscurity.
I'll agree that it doesn't fundamentally fix anything. But, it does
make an attack more difficult in the real world. There's a reason that
real-world attackers are going after slabinfo: it's a fundamentally
*BETTER* than meminfo as a tool with which to aim an attack. A
MB-rounded meminfo is also fundamentally *BETTER* than a
PAGE_SIZE-rounded meminfo. I find it hard to call this "nothing".
Anyway... I'm working on a patch. Will post soon.
-- Dave
WARNING: multiple messages have this Message-ID (diff)
From: Dave Hansen <dave@linux.vnet.ibm.com>
To: Vasiliy Kulikov <segoon@openwall.com>
Cc: David Rientjes <rientjes@google.com>,
Christoph Lameter <cl@gentwo.org>,
kernel-hardening@lists.openwall.com,
Pekka Enberg <penberg@kernel.org>, Matt Mackall <mpm@selenic.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, Kees Cook <kees@ubuntu.com>,
Valdis.Kletnieks@vt.edu,
Linus Torvalds <torvalds@linux-foundation.org>,
Alan Cox <alan@linux.intel.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] mm: restrict access to /proc/meminfo
Date: Thu, 29 Sep 2011 09:30:36 -0700 [thread overview]
Message-ID: <1317313836.16137.620.camel@nimitz> (raw)
In-Reply-To: <20110929161848.GA16348@albatros>
On Thu, 2011-09-29 at 20:18 +0400, Vasiliy Kulikov wrote:
> I'm not convinced with rounding the information to MBs. The attacker
> still may fill slabs with new objects to trigger new slab pages
> allocations. He will be able to see when this MB-granularity barrier is
> overrun thus seeing how many kbs there were before:
>
> old = new - filled_obj_size_sum
>
> As `new' is just increased, it means it is known with KB granularity,
> not MB. By counting used slab objects he learns filled_obj_size_sum.
>
> So, rounding gives us nothing, but obscurity.
I'll agree that it doesn't fundamentally fix anything. But, it does
make an attack more difficult in the real world. There's a reason that
real-world attackers are going after slabinfo: it's a fundamentally
*BETTER* than meminfo as a tool with which to aim an attack. A
MB-rounded meminfo is also fundamentally *BETTER* than a
PAGE_SIZE-rounded meminfo. I find it hard to call this "nothing".
Anyway... I'm working on a patch. Will post soon.
-- Dave
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2011-09-29 16:30 UTC|newest]
Thread overview: 80+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-27 17:54 [kernel-hardening] [PATCH 1/2] mm: restrict access to slab files under procfs and sysfs Vasiliy Kulikov
2011-09-27 17:54 ` Vasiliy Kulikov
2011-09-27 17:54 ` Vasiliy Kulikov
2011-09-27 17:56 ` [kernel-hardening] [PATCH 2/2] mm: restrict access to /proc/meminfo Vasiliy Kulikov
2011-09-27 17:56 ` Vasiliy Kulikov
2011-09-27 17:56 ` Vasiliy Kulikov
2011-09-27 18:27 ` [kernel-hardening] " David Rientjes
2011-09-27 18:27 ` David Rientjes
2011-09-27 18:27 ` David Rientjes
2011-09-27 19:14 ` [kernel-hardening] " Vasiliy Kulikov
2011-09-27 19:14 ` Vasiliy Kulikov
2011-09-27 19:14 ` Vasiliy Kulikov
2011-09-27 19:38 ` [kernel-hardening] " Vasiliy Kulikov
2011-09-27 19:38 ` Vasiliy Kulikov
2011-09-27 19:38 ` Vasiliy Kulikov
2011-09-27 20:03 ` [kernel-hardening] " Christoph Lameter
2011-09-27 20:03 ` Christoph Lameter
2011-09-27 20:03 ` Christoph Lameter
2011-09-27 20:33 ` [kernel-hardening] " David Rientjes
2011-09-27 20:33 ` David Rientjes
2011-09-27 20:33 ` David Rientjes
2011-09-27 20:47 ` [kernel-hardening] " Christoph Lameter
2011-09-27 20:47 ` Christoph Lameter
2011-09-27 20:47 ` Christoph Lameter
2011-09-28 20:31 ` [kernel-hardening] " Dave Hansen
2011-09-28 20:31 ` Dave Hansen
2011-09-28 20:31 ` Dave Hansen
2011-09-28 20:52 ` [kernel-hardening] " Alan Cox
2011-09-28 20:52 ` Alan Cox
2011-09-28 20:52 ` Alan Cox
2011-09-29 0:43 ` [kernel-hardening] " Valdis.Kletnieks
2011-09-29 0:43 ` Valdis.Kletnieks
2011-09-29 14:11 ` [kernel-hardening] " Christoph Lameter
2011-09-29 14:11 ` Christoph Lameter
2011-09-29 14:11 ` Christoph Lameter
2011-09-29 16:18 ` [kernel-hardening] " Vasiliy Kulikov
2011-09-29 16:18 ` Vasiliy Kulikov
2011-09-29 16:18 ` Vasiliy Kulikov
2011-09-29 16:30 ` Dave Hansen [this message]
2011-09-29 16:30 ` Dave Hansen
2011-09-29 16:30 ` Dave Hansen
2011-09-29 16:43 ` [kernel-hardening] " Vasiliy Kulikov
2011-09-29 16:43 ` Vasiliy Kulikov
2011-09-29 16:57 ` Valdis.Kletnieks
2011-09-29 16:57 ` Valdis.Kletnieks
2011-09-29 17:25 ` [kernel-hardening] " Vasiliy Kulikov
2011-09-29 17:25 ` Vasiliy Kulikov
2011-09-29 17:28 ` Vasiliy Kulikov
2011-09-29 17:28 ` Vasiliy Kulikov
2011-09-29 17:28 ` Vasiliy Kulikov
2011-09-28 21:46 ` [kernel-hardening] " Andrew Morton
2011-09-28 21:46 ` Andrew Morton
2011-09-28 21:46 ` Andrew Morton
2011-09-30 19:53 ` [kernel-hardening] " Vasiliy Kulikov
2011-09-30 19:53 ` Vasiliy Kulikov
2011-09-30 19:53 ` Vasiliy Kulikov
2011-09-30 20:03 ` [kernel-hardening] " Andrew Morton
2011-09-30 20:03 ` Andrew Morton
2011-09-30 20:03 ` Andrew Morton
2011-09-30 20:12 ` [kernel-hardening] " Vasiliy Kulikov
2011-09-30 20:12 ` Vasiliy Kulikov
2011-09-30 20:12 ` Vasiliy Kulikov
2011-09-30 20:15 ` [kernel-hardening] " Dave Hansen
2011-09-30 20:15 ` Dave Hansen
2011-09-30 20:15 ` Dave Hansen
2011-09-27 18:08 ` [kernel-hardening] Re: [PATCH 1/2] mm: restrict access to slab files under procfs and sysfs Christoph Lameter
2011-09-27 18:08 ` Christoph Lameter
2011-09-27 18:08 ` Christoph Lameter
2011-09-27 19:16 ` [kernel-hardening] " Vasiliy Kulikov
2011-09-27 19:16 ` Vasiliy Kulikov
2011-09-27 19:16 ` Vasiliy Kulikov
2011-09-27 19:35 ` [kernel-hardening] " Christoph Lameter
2011-09-27 19:35 ` Christoph Lameter
2011-09-27 19:35 ` Christoph Lameter
2011-09-27 18:21 ` [kernel-hardening] " David Rientjes
2011-09-27 18:21 ` David Rientjes
2011-09-27 18:21 ` David Rientjes
2011-09-27 20:00 ` [kernel-hardening] " Pekka Enberg
2011-09-27 20:00 ` Pekka Enberg
2011-09-27 20:00 ` Pekka Enberg
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=1317313836.16137.620.camel@nimitz \
--to=dave@linux.vnet.ibm.com \
--cc=Valdis.Kletnieks@vt.edu \
--cc=akpm@linux-foundation.org \
--cc=alan@linux.intel.com \
--cc=cl@gentwo.org \
--cc=kees@ubuntu.com \
--cc=kernel-hardening@lists.openwall.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mpm@selenic.com \
--cc=penberg@kernel.org \
--cc=rientjes@google.com \
--cc=segoon@openwall.com \
--cc=torvalds@linux-foundation.org \
/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.