From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753932Ab1ISOri (ORCPT ); Mon, 19 Sep 2011 10:47:38 -0400 Received: from mail-ey0-f174.google.com ([209.85.215.174]:42743 "EHLO mail-ey0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752722Ab1ISOrh (ORCPT ); Mon, 19 Sep 2011 10:47:37 -0400 Date: Mon, 19 Sep 2011 18:46:58 +0400 From: Vasiliy Kulikov To: Pekka Enberg Cc: Andrew Morton , kernel-hardening@lists.openwall.com, Kees Cook , Cyrill Gorcunov , Al Viro , Christoph Lameter , Matt Mackall , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Dan Rosenberg , Theodore Tso , Alan Cox , Jesper Juhl , Linus Torvalds Subject: Re: [kernel-hardening] Re: [RFC PATCH 2/2] mm: restrict access to /proc/slabinfo Message-ID: <20110919144657.GA5928@albatros> References: <20110910164001.GA2342@albatros> <20110910164134.GA2442@albatros> <20110914192744.GC4529@outflux.net> <20110918170512.GA2351@albatros> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Pekka, On Mon, Sep 19, 2011 at 17:30 +0300, Pekka Enberg wrote: > > On Wed, Sep 14, 2011 at 12:27 -0700, Kees Cook wrote: > >> On Sat, Sep 10, 2011 at 08:41:34PM +0400, Vasiliy Kulikov wrote: > >> > Historically /proc/slabinfo has 0444 permissions and is accessible to > >> > the world.  slabinfo contains rather private information related both to > >> > the kernel and userspace tasks.  Depending on the situation, it might > >> > reveal either private information per se or information useful to make > >> > another targeted attack.  Some examples of what can be learned by > >> > reading/watching for /proc/slabinfo entries: > >> > ... > >> > World readable slabinfo simplifies kernel developers' job of debugging > >> > kernel bugs (e.g. memleaks), but I believe it does more harm than > >> > benefits.  For most users 0444 slabinfo is an unreasonable attack vector. > >> > > >> > Signed-off-by: Vasiliy Kulikov > > On Sun, Sep 18, 2011 at 8:05 PM, Vasiliy Kulikov wrote: > >> Haven't had any mass complaints about the 0400 in Ubuntu (sorry Dave!), so > >> I'm obviously for it. > >> > >> Reviewed-by: Kees Cook > > > > Looks like the members of the previous slabinfo discussion don't object > > against the patch now and it got two other Reviewed-by responses.  Can > > you merge it as-is or should I probably convince someone else? > > We discussed this in March (google for 'Make /proc/slabinfo 0400') Sure, I've read it and included the link in the patch description :) > and > concluded that it's not worth it doesn't really protect from anything Closing only slabinfo doesn't add any significant protection against kernel heap exploits per se, no objections here. But as said in the desciption, the reason for this patch is not protecting against exploitation heap bugs. It is a source of infoleaks of kernel and userspace activity, which should be forbidden to non-root users. > and causes harm to developers. One note: only to _kernel_ developers. It means it is a strictly debugging feature, which shouldn't be enabled in the production systems. Thanks, -- Vasiliy Kulikov http://www.openwall.com - bringing security into open computing environments