From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Tobin C. Harding" Subject: Re: [PATCH v4] scripts: add leaking_addresses.pl Date: Wed, 8 Nov 2017 07:58:20 +1100 Message-ID: <20171107205820.GX18478@eros> References: <1510050731-32446-1-git-send-email-me@tobin.cc> <063D6719AE5E284EB5DD2968C1650D6DD00B3BD1@AcuExch.aculab.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "kernel-hardening@lists.openwall.com" , "Jason A. Donenfeld" , Theodore Ts'o , Linus Torvalds , Kees Cook , Paolo Bonzini , Tycho Andersen , "Roberts, William C" , Tejun Heo , Jordan Glover , Greg KH , Petr Mladek , Joe Perches , Ian Campbell , Sergey Senozhatsky , Catalin Marinas , Will Deacon , Steven Rostedt , Chris Fries Return-path: Content-Disposition: inline In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6DD00B3BD1@AcuExch.aculab.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Tue, Nov 07, 2017 at 01:56:05PM +0000, David Laight wrote: > From: Tobin C. Harding > > Sent: 07 November 2017 10:32 > > > > Currently we are leaking addresses from the kernel to user space. This > > script is an attempt to find some of those leakages. Script parses > > `dmesg` output and /proc and /sys files for hex strings that look like > > kernel addresses. > ... > > Maybe the %p that end up in dmesg (via the kernel message buffer) should > be converted to text in a form that allows the code that reads them to > substitute alternate text for non-root users? > > Then the actual addresses will be available to root (who can probably > get most by other means) but not to the casual observer. Interesting idea. Isn't the same outcome already achieved with dmesg_restrict. I appreciate that this does beg the question 'why are we scanning dmesg then?' There has not been much discussion on dmesg_restrict. Is dmesg_restrict good enough that we needn't bother scanning it? thanks for your input, Tobin.