mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Richard Weinberger <richard@nod.at>,
	David Miller <davem@davemloft.net>,
	Thomas Gleixner <tglx@linutronix.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-arch <linux-arch@vger.kernel.org>,
	Al Viro <viro@zeniv.linux.org.uk>,
	richard -rw- weinberger <richard.weinberger@gmail.com>,
	"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@kernel.org>,
	Kees Cook <keescook@chromium.org>
Subject: Re: [PATCH v2] all arches, signal: Move restart_block to struct task_struct
Date: Wed, 3 Dec 2014 15:37:21 -0800	[thread overview]
Message-ID: <20141203153721.30b32472145aa560921bdc1e@linux-foundation.org> (raw)
In-Reply-To: <CALCETrUZhbx-PN8A168khFr6ve_9vdkSiwOcQ-hZbqu4po8hnQ@mail.gmail.com>

On Mon, 1 Dec 2014 06:55:01 -0800 Andy Lutomirski <luto@amacapital.net> wrote:

> On Tue, Nov 11, 2014 at 2:52 AM, Richard Weinberger <richard@nod.at> wrote:
> > Am 11.11.2014 um 03:13 schrieb David Miller:
> >> From: Andy Lutomirski <luto@amacapital.net>
> >> Date: Mon, 10 Nov 2014 14:03:23 -0800
> >>
> >>> On Wed, Oct 29, 2014 at 11:12 AM, Thomas Gleixner <tglx@linutronix.de> wrote:
> >>>> On Wed, 29 Oct 2014, Andy Lutomirski wrote:
> >>>>
> >>>>> If an attacker can cause a controlled kernel stack overflow,
> >>>>> overwriting the restart block is a very juicy exploit target.
> >>>>> Moving the restart block to struct task_struct prevents this
> >>>>> exploit.
> >>>>>
> >>>>> Note that there are other fields in thread_info that are also easy
> >>>>> targets, at least on some architectures.
> >>>>>
> >>>>> It's also a decent simplification, since the restart code is more or
> >>>>> less identical on all architectures.
> >>>>
> >>>> I think that's the most important change. Moving common stuff into
> >>>> common code. The side effect of slightly reducing the attack surface
> >>>> is nice, but as Al pointed out not really the big win here.
> >>>
> >>> Having gotten exactly zero feedback from any arch maintainer outside
> >>> of x86, am I supposed to pester people further?
> >>
> >> No objections wrt. sparc and if things break I'll help fix it.
> >
> > Same for UML.
> > Acked-by: Richard Weinberger <richard@nod.at>
> 
> akpm, do you consider this appropriate for either 3.19 or 3.20?  If
> so, can you add it to the appropriate part of -mm?

Yes, I can grab it.  Probably for .20, as the lag times for exposing
issues in obscures architectures are lengthy.

One clarification:

: If an attacker can cause a controlled kernel stack overflow,
: overwriting the restart block is a very juicy exploit target.

This is because the thread_info actually resides in the memory which
was allocated for the kernel stack, yes?  Whereas the task_struct is
separately allocated and is harder to find?

Spelling this out in the changelog would be useful for the ignorant and
the forgetful ;)

: Moving the restart block to struct task_struct prevents this
: exploit.



  reply	other threads:[~2014-12-03 23:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-29 17:36 Andy Lutomirski
2014-10-29 18:12 ` Thomas Gleixner
2014-11-10 22:03   ` Andy Lutomirski
2014-11-11  2:13     ` David Miller
2014-11-11 10:52       ` Richard Weinberger
2014-12-01 14:55         ` Andy Lutomirski
2014-12-03 23:37           ` Andrew Morton [this message]
2014-12-03 23:38             ` Andy Lutomirski
2014-12-03 23:53               ` Andrew Morton
2014-12-04  0:01                 ` Andy Lutomirski
2014-12-05 11:13           ` Chuck Ebbert
2014-12-08 22:51             ` Andy Lutomirski

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=20141203153721.30b32472145aa560921bdc1e@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=hpa@zytor.com \
    --cc=keescook@chromium.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mingo@kernel.org \
    --cc=richard.weinberger@gmail.com \
    --cc=richard@nod.at \
    --cc=tglx@linutronix.de \
    --cc=viro@zeniv.linux.org.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®