Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1811854imm; Mon, 3 Sep 2018 10:03:59 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZoL4O/7ghQfeUy7otWC8rFs+rQ7sC6Q4Os5PhS8t+Bos4tpYa+OoJ2ijw8boqsha+ek8J6 X-Received: by 2002:a17:902:8ec8:: with SMTP id x8-v6mr29457293plo.308.1535994239861; Mon, 03 Sep 2018 10:03:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535994239; cv=none; d=google.com; s=arc-20160816; b=bFMxkjrtLlHW5EwcFhlrHqbVxs1lgSj1BVIN7176FR0FI48x7OErJMqJN5V7Q5C6vV Zv8hdAbjt7Itn9t3Lb9vNsB4Dlr2FlAAbgKNY8tZqcARJq+75LSQe4ho8SdoP2c7YYfq yExCNqzVZrxhKLhGljDAtBb/PcN+ZfeMJoirSRffiX2PO2IAJQw7yIduTioAGjdfEy/I DF5sY8Z1QU8xjFF/iTFYX9Uwg6yg0zpzodOXxlqZggvcBAf7xqaIQvMy6acweXetZGwK sxuggJ9hyWoUHoqxwukdyaStbCEsYNAPkdlevTrOLI33gGpCRPob5kZkGTIb7QRIs2pN Oucg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=E3eETrq5+rQGADuNLQGhCb/6zpp/cWB+lUg+wLKpZSk=; b=V7rQBDBEt+PQ+JGehO8Yh6WCPOw20xh6invrCJpKyp6nCp88luE73Na6sQZFDylDBA UB/Kflq/ZWU1+lYPTjsNjZtE0rZ+Ac081z1o+xSpt+KfNRV6ddRjnRsudBa5olGKIkCz nE9k4ANTtiloIhbBk/48DtSyyG7Pje4+jua0aPDX3XBi2u/YlmvAaar9jPwNMiKLmCNV Wo6s3MPRcfZFGrGiT2W9vzAP13H6oM/rLWbIsRyeK/V/beCBsjoPsCOgrvlONSR5ed+p PZ/QwDAWa01gbNRlEul6h2AYiseXQfBP1vPeYYxcOHmLrxOjz6CtLL+llEGVk/cXJw0H Tngg== 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 u90-v6si18762244pfk.82.2018.09.03.10.03.44; Mon, 03 Sep 2018 10:03:59 -0700 (PDT) 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 S1728915AbeICVXS (ORCPT + 99 others); Mon, 3 Sep 2018 17:23:18 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:38908 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728215AbeICVXR (ORCPT ); Mon, 3 Sep 2018 17:23:17 -0400 Received: from localhost (ip-213-127-74-90.ip.prioritytelecom.net [213.127.74.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 122B9CEE; Mon, 3 Sep 2018 17:02:17 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thomas Richter , Ingo Molnar , Masami Hiramatsu , Ananth N Mavinakayanahalli , Anil S Keshavamurthy , Arnd Bergmann , David Howells , "David S . Miller" , Heiko Carstens , Jon Medhurst , Linus Torvalds , Peter Zijlstra , Thomas Gleixner , "Tobin C . Harding" , Will Deacon , acme@kernel.org, akpm@linux-foundation.org, brueckner@linux.vnet.ibm.com, linux-arch@vger.kernel.org, rostedt@goodmis.org, schwidefsky@de.ibm.com Subject: [PATCH 4.4 74/80] kprobes: Make list and blacklist root user read only Date: Mon, 3 Sep 2018 18:49:52 +0200 Message-Id: <20180903164937.102180022@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180903164934.171677301@linuxfoundation.org> References: <20180903164934.171677301@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable 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 Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/lkml/152491890171.9916.5183693615601334087.stgit@devbox Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman --- kernel/kprobes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/kernel/kprobes.c +++ b/kernel/kprobes.c @@ -2441,7 +2441,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; @@ -2451,7 +2451,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;