Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2975145imu; Sun, 9 Dec 2018 14:04:59 -0800 (PST) X-Google-Smtp-Source: AFSGD/W/93EBJ/kJjrIsV70X1p1sHS84GYUk2X13vZJH1T7LzoYtQbHDjLm+yNZhCcPLIoa+TqwF X-Received: by 2002:a63:4384:: with SMTP id q126mr8728472pga.160.1544393099409; Sun, 09 Dec 2018 14:04:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544393099; cv=none; d=google.com; s=arc-20160816; b=oS1h5cJy5rQxCm8YvFoALutN+SR4u2lb6I7bFtQ/gSafu8yoS6heDcdyZWZpE/bkY9 derk8Ec7NjHTqudBo3yjrPEpUrnpXzKWez11h7boecgvZPL+BY/vEHSer916d/6pUx9B UHvOrJK4Y5/0oPDYEaP0TSCOfnvC0+FyeRnQsO4OzlTjXA15KUtHL1Mw0NSWhuERuool THKVYUpJh4jKlGVvfc6curxDWGqixtI0tgMN6VE4Wt8/aiahFhwNh/MDbRCC1j29+vpL cQLfm65lRb1dzU3a6O8cf5ZdlAbJv5Q6T4IJVw7j3HpdQCuyPjhwajXanLE7pY1Py2YG 7SGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=MT9yroq0jVgVxK9GF4JzPnTfkB6ZEzLW2Z+5uAKB6u0=; b=S4ZrxvLnKJ+MnmWvaRl0z3aiuTipKA+19zLsq5Oi3/RavU9U2oBPESRt7Sb4fG89gt usrQwCROD0WnUKYp2p70HNE3S4qWnXkWlqFl6eeNugPQCJR6uNHghYW8Vy6N7cA5kUho oYlKfOjr9MTYX4NYq5ab71qmZQZngWTsCf4F1HScxCTcUtwcwsxT4/lyCuBq18heuATj XLEcRtbcOTUCrUNwYFoOIUbGkc52lWUcSVklspBR8yQKuSsBua1HFbHQjrEQgh16k/6p FyFgsAJTae+3va5fv4M1FxWtm4oKpmzfcGsAPLZpdT9iS4pICsrWnvicFy9kiXtGu4Z0 Y0og== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ay4si8200479plb.235.2018.12.09.14.04.44; Sun, 09 Dec 2018 14:04:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726624AbeLIVz3 (ORCPT + 99 others); Sun, 9 Dec 2018 16:55:29 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:34794 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726413AbeLIVzO (ORCPT ); Sun, 9 Dec 2018 16:55:14 -0500 Received: from pub.yeoldevic.com ([81.174.156.145] helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gW72Y-0002if-Pm; Sun, 09 Dec 2018 21:55:06 +0000 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1gW72X-0003CU-Sj; Sun, 09 Dec 2018 21:55:05 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Linus Torvalds" , "Will Deacon" , schwidefsky@de.ibm.com, linux-arch@vger.kernel.org, "Jon Medhurst" , "Thomas Richter" , "Thomas Gleixner" , "Masami Hiramatsu" , "Anil S Keshavamurthy" , rostedt@goodmis.org, "Arnd Bergmann" , "Heiko Carstens" , brueckner@linux.vnet.ibm.com, "David Howells" , "Peter Zijlstra" , "Tobin C . Harding" , "Ananth N Mavinakayanahalli" , "David S . Miller" , acme@kernel.org, "Ingo Molnar" Date: Sun, 09 Dec 2018 21:50:33 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) X-Patchwork-Hint: ignore Subject: [PATCH 3.16 005/328] kprobes: Make list and blacklist root user read only In-Reply-To: X-SA-Exim-Connect-IP: 81.174.156.145 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.62-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Masami Hiramatsu commit f2a3ab36077222437b4826fc76111caa14562b7c upstream. Since the blacklist and list files on debugfs indicates a sensitive address information to reader, it should be restricted to the root user. Suggested-by: Thomas Richter Suggested-by: Ingo Molnar Signed-off-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: Anil S Keshavamurthy Cc: Arnd Bergmann Cc: David Howells Cc: David S . Miller Cc: Heiko Carstens Cc: Jon Medhurst Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tobin C . Harding Cc: Will Deacon Cc: acme@kernel.org Cc: akpm@linux-foundation.org Cc: brueckner@linux.vnet.ibm.com Cc: linux-arch@vger.kernel.org Cc: rostedt@goodmis.org Cc: schwidefsky@de.ibm.com Link: https://lkml.kernel.org/lkml/152491890171.9916.5183693615601334087.stgit@devbox Signed-off-by: Ingo Molnar Signed-off-by: Ben Hutchings --- kernel/kprobes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/kernel/kprobes.c +++ b/kernel/kprobes.c @@ -2414,7 +2414,7 @@ static int __init debugfs_kprobe_init(vo if (!dir) return -ENOMEM; - file = debugfs_create_file("list", 0444, dir, NULL, + file = debugfs_create_file("list", 0400, dir, NULL, &debugfs_kprobes_operations); if (!file) goto error; @@ -2424,7 +2424,7 @@ static int __init debugfs_kprobe_init(vo if (!file) goto error; - file = debugfs_create_file("blacklist", 0444, dir, NULL, + file = debugfs_create_file("blacklist", 0400, dir, NULL, &debugfs_kprobe_blacklist_ops); if (!file) goto error;