All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Kees Cook <keescook@chromium.org>
Cc: stable@vger.kernel.org, Patrick McLean <chutzpah@gentoo.org>,
	"Maciej S. Szmigiero" <mail@maciej.szmigiero.name>
Subject: Re: [PATCH 4.15,4.14] path.h: Include compiler types to avoid missed struct attributes
Date: Fri, 23 Feb 2018 08:08:04 +0100	[thread overview]
Message-ID: <20180223070804.GA19052@kroah.com> (raw)
In-Reply-To: <20180222233429.GA43713@beast>

On Thu, Feb 22, 2018 at 03:34:29PM -0800, Kees Cook wrote:
> commit 28128c61e08eaeced9cc8ec0e6b5d677b5b94690 upstream.
> 
> The header files for some structures could get included in such a way
> that struct attributes (specifically __randomize_layout from path.h) would
> be parsed as variable names instead of attributes. This could lead to
> some instances of a structure being unrandomized, causing nasty GPFs, etc.
> 
> This patch makes sure the compiler_types.h header is included in path.h.
> 
> Reported-by: Patrick McLean <chutzpah@gentoo.org>
> Root-caused-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
> Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
> Tested-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
> Fixes: 3859a271a003 ("randstruct: Mark various structs for randomization")
> Signed-off-by: Kees Cook <keescook@chromium.org>
> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
> [kees: Adjusted to just path.h for -stable, as this is a smaller change]
> Signed-off-by: Kees Cook <keescook@chromium.org>
> ---
> This is a much more narrow fix for the issue. I adjusted the commit subject
> and body, but still reference the "full" upstream commit. Is this the best
> way to handle this?

What's wrong with just taking the original upstream commit here?  It's
only 2 lines, in kconfig.h instead of path.h.  What is the reason this
has to be in path.h for 4.14.y and 4.15.y?

thanks,

greg k-h

  reply	other threads:[~2018-02-23  7:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-22 23:34 [PATCH 4.15,4.14] path.h: Include compiler types to avoid missed struct attributes Kees Cook
2018-02-23  7:08 ` Greg Kroah-Hartman [this message]
2018-02-23 17:27   ` Kees Cook
2018-02-23 19:37     ` Greg Kroah-Hartman
2018-02-23 20:27       ` Kees Cook
2018-02-26 13:00         ` Greg Kroah-Hartman

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=20180223070804.GA19052@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=chutzpah@gentoo.org \
    --cc=keescook@chromium.org \
    --cc=mail@maciej.szmigiero.name \
    --cc=stable@vger.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.