All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Kees Cook <keescook@chromium.org>
Cc: linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>,
	x86@kernel.org, Andrew Morton <akpm@linux-foundation.org>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Dan Rosenberg <dan.j.rosenberg@gmail.com>,
	Brad Spengler <spender@grsecurity.net>
Subject: Re: [PATCH] x86: do not leak kernel page mapping locations
Date: Thu, 07 Feb 2013 11:26:02 -0800	[thread overview]
Message-ID: <5113FFCA.6040108@zytor.com> (raw)
In-Reply-To: <20130207174413.GA12485@www.outflux.net>

On 02/07/2013 09:44 AM, Kees Cook wrote:
> Without this patch, it is trivial to determine kernel page mappings by
> examining the error code reported to dmesg[1]. Instead, declare the entire
> kernel memory space as a violation of a present page.
> 
> Additionally, since show_unhandled_signals is enabled by default, switch
> branch hinting to the more realistic expectation, and unobfuscate the
> setting of the PF_PROT bit to improve readability.
> 
> [1] http://vulnfactory.org/blog/2013/02/06/a-linux-memory-trick/
> 
> Reported-by: Dan Rosenberg <dan.j.rosenberg@gmail.com>
> Suggested-by: Brad Spengler <spender@grsecurity.net>
> Cc: stable@vger.kernel.org
> Signed-off-by: Kees Cook <keescook@chromium.org>

There is, of course, tons of information in dmesg which can be used for
nefarious purposes, and it is hard to avoid that without neutering dmesg
to uselessness.

So the question is to some degree how much this adds in isolation from
locking down dmesg (and if dmesg_restrict isn't enough, what more do we
need...)?

That being said, the patch doesn't seem to do any harm so I acked it and
Ingo is going to apply it.

	-hpa




  reply	other threads:[~2013-02-07 19:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-07 17:44 [PATCH] x86: do not leak kernel page mapping locations Kees Cook
2013-02-07 19:26 ` H. Peter Anvin [this message]
2013-02-08 14:05 ` [tip:x86/urgent] x86: Do " tip-bot for Kees Cook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5113FFCA.6040108@zytor.com \
    --to=hpa@zytor.com \
    --cc=akpm@linux-foundation.org \
    --cc=dan.j.rosenberg@gmail.com \
    --cc=ebiederm@xmission.com \
    --cc=fweisbec@gmail.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=spender@grsecurity.net \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.