Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1827999imm; Mon, 3 Sep 2018 10:28:33 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb04xmPNBdL/UNrFat+45yEpXmZTtNz82z2WNZ4DuVYb44RHF787dsdTZO42pZuLjpT1V6f X-Received: by 2002:a63:2e09:: with SMTP id u9-v6mr26229024pgu.294.1535995713443; Mon, 03 Sep 2018 10:28:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535995713; cv=none; d=google.com; s=arc-20160816; b=g1/q2zGGHAQ5Mkc2SYG6q1PUFO5jP1ZcWZ+roLGCAMkzkDeWpy8eZYOiv5bUGRSo3q w0QhUHFnxJGc2114qxULjM3ouGYWaXa1h5h4fTttEi5P8MTl8b1xAFcCYJKzMj+SYjvb l5dJFOtet2+NCqldYCAP5KE1bV8LZRCQYkboNsIAhpYoS7kEuPD6SkciZHL3luEeVsEi QrQ6Co+W5RR1zcgrfCHv7iIUEyYmCC9jMVRNpRd65kpFq0bysUtQWCKAQ01iqruUUvo1 9bhYOlB2Kd6mRGfZOYxQhHYDPTLXcZ6KKI7Etw7BXVCzdJlGrWppiuBRMEQasg026UOG kvyA== 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=leImu7DCtg00hQCjK427j86fKtHQM/rav8nQoLffmYo=; b=Bwy12ESlJw7ZpBNpZdkxx3JKJzWrGf4x7stY9bVKORHsdpqqX8QCuova6BXhvIx5Lv 906zV3Kfdv7Hrg9+iCNW1zm8BqnAyrm7HkPaDFGEH4JJWQQ00EL4cNcelGQBL5Bbqi+4 VuagorQUuPU8ohUY8mtJModGHHttF2vO+4OM9wr4nWbltzM7YEtrZHmzQhCg2NDHS8LV 8StNGKnvkDGBf2TSORZ09GGD80+8eWxlHCIw9LQMHXrfgRLXpex/hd019nJpAQGpZMaq SzACgLXFt4YQ3axVFHLfsfDpCVVWPQFFo0mmmKmZZlztJIIe0e3e/y7MHMpcrIucc7XC 0mBQ== 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 m5-v6si21105219pfb.104.2018.09.03.10.28.18; Mon, 03 Sep 2018 10:28:33 -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 S1730995AbeICVsX (ORCPT + 99 others); Mon, 3 Sep 2018 17:48:23 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:46216 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730679AbeICVsW (ORCPT ); Mon, 3 Sep 2018 17:48:22 -0400 Received: from localhost (ip-213-127-74-90.ip.prioritytelecom.net [213.127.74.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id CCCC6D01; Mon, 3 Sep 2018 17:27:14 +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.14 148/165] kprobes: Make list and blacklist root user read only Date: Mon, 3 Sep 2018 18:57:14 +0200 Message-Id: <20180903165704.399453404@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180903165655.003605184@linuxfoundation.org> References: <20180903165655.003605184@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.14-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 @@ -2531,7 +2531,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; @@ -2541,7 +2541,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;