From patchwork Tue Feb 22 18:28:37 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 83989 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 3B08DB70E3 for ; Wed, 23 Feb 2011 05:28:58 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1Prwye-0001XZ-GK; Tue, 22 Feb 2011 18:28:48 +0000 Received: from smtp.outflux.net ([198.145.64.163]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1Prwyb-0001XC-Qf for kernel-team@lists.ubuntu.com; Tue, 22 Feb 2011 18:28:46 +0000 Received: from www.outflux.net (serenity-end.outflux.net [10.2.0.2]) by vinyl.outflux.net (8.14.3/8.14.3/Debian-9.1ubuntu1) with ESMTP id p1MISiFj016287 for ; Tue, 22 Feb 2011 10:28:44 -0800 From: Kees Cook To: kernel-team@lists.ubuntu.com Subject: [PATCH 2/2] debugfs: only allow root access to debugging interfaces Date: Tue, 22 Feb 2011 10:28:37 -0800 Message-Id: <1298399317-19508-3-git-send-email-kees.cook@canonical.com> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1298399317-19508-1-git-send-email-kees.cook@canonical.com> References: <1298399317-19508-1-git-send-email-kees.cook@canonical.com> X-MIMEDefang-Filter: outflux$Revision: 1.316 $ X-HELO: www.outflux.net X-Scanned-By: MIMEDefang 2.67 on 10.2.0.1 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com Block access to the potentially dangerous debugging interfaces in the debugfs filesystem. Signed-off-by: Kees Cook --- fs/debugfs/inode.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c index 3cb33c3..83c61a3 100644 --- a/fs/debugfs/inode.c +++ b/fs/debugfs/inode.c @@ -133,7 +133,7 @@ static int debug_fill_super(struct super_block *sb, void *data, int silent) static struct tree_descr debug_files[] = {{""}}; return simple_fill_super(sb, DEBUGFS_MAGIC, debug_files, - S_IWUSR | S_IRUGO | S_IXUGO); + S_IRWXU); } static struct dentry *debug_mount(struct file_system_type *fs_type,