From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752354AbcHZF6H (ORCPT ); Fri, 26 Aug 2016 01:58:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50850 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751668AbcHZF6G (ORCPT ); Fri, 26 Aug 2016 01:58:06 -0400 Date: Fri, 26 Aug 2016 00:56:58 -0500 From: Josh Poimboeuf To: Linus Torvalds Cc: Frederic Weisbecker , Thomas Gleixner , Kees Cook , "H . Peter Anvin" , Nilay Vaish , the arch/x86 maintainers , Steven Rostedt , Andy Lutomirski , Ingo Molnar , Linux Kernel Mailing List , Brian Gerst , Byungchul Park , Peter Zijlstra Subject: Re: [PATCH 3/6] x86/dumpstack: make printk_stack_address() more generally useful Message-ID: <20160826055658.igc5dghceuwwb6vu@treble> References: <20160824182220.GB10153@twins.programming.kicks-ass.net> <20160824193707.qw7vii3l4ggcfl6d@treble> <20160825174904.vfam55lpo7geczqf@treble> <20160825210716.e3p42qm5k4yd3cqb@treble> <20160826031904.ldqgc6bg4g6is4un@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 26 Aug 2016 05:57:01 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 25, 2016 at 09:40:12PM -0700, Linus Torvalds wrote: > On Thu, Aug 25, 2016 at 8:19 PM, Josh Poimboeuf wrote: > > So yes, dmesg_restrict sounds useful to me. It's a way to prevent users > > from seeing kernel addresses without affecting my ability to debug > > issues. For a locked down system, why would non-root users need to > > access dmesg anyway? > > That's the point. It is only useful for locked-down systems. > > But that also means that IT IS NOT USEFUL AS A SECURITY ARGUMENT - > since it's simply not relevant to most systems out there. > > Most systems aren't locked down. Ok, so maybe removing kernel text addresses from the stack dump wouldn't be the end of the world. But I still don't quite understand your statement that dmesg_restrict is only useful for locked down systems. To prevent kernel address disclosure, it seems we already rely on the user setting kptr_restrict today, otherwise I can do cat /proc/self/stack and the game is already lost, right? So what's the difference between expecting the user to set kptr_restrict vs dmesg_restrict? -- Josh