Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753895Ab3JBTtl (ORCPT ); Wed, 2 Oct 2013 15:49:41 -0400 Received: from mail-ie0-f181.google.com ([209.85.223.181]:44904 "EHLO mail-ie0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753385Ab3JBTti (ORCPT ); Wed, 2 Oct 2013 15:49:38 -0400 MIME-Version: 1.0 In-Reply-To: <20130929103746.GB3459@dztty> References: <1380140085-29712-1-git-send-email-tixxdz@opendz.org> <1380140085-29712-7-git-send-email-tixxdz@opendz.org> <20130929103746.GB3459@dztty> Date: Wed, 2 Oct 2013 12:49:38 -0700 X-Google-Sender-Auth: W2JDzlRFUVuDJlNY2vpFFJCT_bg Message-ID: Subject: Re: [PATCH 06/12] procfs: make /proc/*/stack 0400 From: Kees Cook To: Djalal Harouni Cc: "Eric W. Biederman" , Al Viro , Andrew Morton , Linus Torvalds , Ingo Molnar , "Serge E. Hallyn" , Cyrill Gorcunov , LKML , "linux-fsdevel@vger.kernel.org" , "kernel-hardening@lists.openwall.com" , Djalal Harouni Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1649 Lines: 40 On Sun, Sep 29, 2013 at 3:37 AM, Djalal Harouni wrote: > On Thu, Sep 26, 2013 at 03:43:24PM -0500, Kees Cook wrote: >> On Wed, Sep 25, 2013 at 3:14 PM, Djalal Harouni wrote: >> > The /proc/*/stack contains sensitive information and currently its mode >> > is 0444. Change this to 0400 so the VFS will be able to block >> > unprivileged processes to get file descriptors on arbitrary privileged >> > /proc/*/stack files. >> > >> > The /proc/*/stack is a /procfs ONE file that shares the same ->open() >> > file operation with other ONE files. Doing a ptrace_may_access() check >> > during open() might break userspace from accessing other ONE files >> > like /proc/*/stat and /proc/*/statm. >> > >> > Therfore make it 0400 for now, and improve its check during ->read() >> > in the next following patch. >> > >> > Cc: Kees Cook >> > Cc: Eric W. Biederman >> > Signed-off-by: Djalal Harouni >> >> While the rest of the series is being discussed, I think it would be >> nice to at least get this into the tree. Fixing this reduces which >> processes are exposed to ASLR leaks. The rest of the series closes the >> remaining holes. > Kees I guess it's ok to add your Acked-by for this one, for v2 Yes, please. :) Acked-by: Kees Cook -Kees -- Kees Cook Chrome OS Security -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/