Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1835676imm; Mon, 3 Sep 2018 10:40:15 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYHIicYo6Fgzn00h3GAWrsP1WDFFxR0fr3fIyEGJJGHnil57YJwe8Zz5YMo+XJntLX+Cfb2 X-Received: by 2002:a65:5581:: with SMTP id j1-v6mr26864969pgs.203.1535996415889; Mon, 03 Sep 2018 10:40:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535996415; cv=none; d=google.com; s=arc-20160816; b=tlBD0kiHnrceR4cltRwcD0wBOf7Ia2QiebEZEqvtIED3LTmNYa+Rkz0/IHC2tDEfXu EO6vSi8m1D8OGBOPgRAaN6E7l/+DP/zy58nbrjRjOxWrcW/tCweGqQxlxIEgYpB/kh9y 924zvy25Sv5QkpPODzSSRhiqTRDUckBHPkNo6MyU+dnrbIOhWjSJnb3mFkOoCpf0zbbF zkkm4GGzWrbw5vWjQ7n/rOuVACHtOmYgOfK66OXJUjpjh5adrf+ms56pUadYhPo4eB7F XM6Sc5GouXLOzmMZW8EsTVuNMITqglyxs7UaZb7RxwrSrx85ySqoTufudHU3TsqRLAT+ YYvw== 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=6+yNAQHfWB2HQxdNQ2/MIWgy1I4Gxdvn5i6/WOctMUQ=; b=Tq/j7ZC9rbzhwZP1GMnMkxBX8g2OgTIC53hsyqcnZ/NhEZe2ZKdz+iVBiunfTRh6g2 YR5ccCd5twJXBGESvUrPplQOgmgQ4WJzfSUzpKqtrwDtmLYVqqxUn+sGekVQKhpcTM5U T487nNVaJjfvfLXaKKxQQeWqCO6iPDY5RFYaCvHi8rDz6vPTMXEZkvb8jvYm9RlkB6aT Mmr2ZpXJWJiZ29d7NXcn771s7bXPZdt7IPvdyDkSJ01BBaxgDMKvPUFTdD+oXVRgq7/h iTwKf7uGS81ARUNpDyIFZRwrzXAONuTBvT4iaIXwKYrK7qce+o9KinD3KTmB+Rc2NcEs 62jQ== 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 y66-v6si2893379pgy.609.2018.09.03.10.40.00; Mon, 03 Sep 2018 10:40:15 -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 S1731807AbeICV7c (ORCPT + 99 others); Mon, 3 Sep 2018 17:59:32 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:48920 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726384AbeICV7c (ORCPT ); Mon, 3 Sep 2018 17:59:32 -0400 Received: from localhost (ip-213-127-74-90.ip.prioritytelecom.net [213.127.74.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id DB4F6A95; Mon, 3 Sep 2018 17:38:20 +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.18 098/123] kprobes: Make list and blacklist root user read only Date: Mon, 3 Sep 2018 18:57:22 +0200 Message-Id: <20180903165723.658677770@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180903165719.499675257@linuxfoundation.org> References: <20180903165719.499675257@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.18-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 @@ -2617,7 +2617,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; @@ -2627,7 +2627,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;