All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Kees Cook <keescook@chromium.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Michal Hocko <mhocko@kernel.org>,
	Ben Hutchings <ben@decadent.org.uk>, Willy Tarreau <w@1wt.eu>,
	Hugh Dickins <hughd@google.com>, Oleg Nesterov <oleg@redhat.com>,
	"Jason A. Donenfeld" <Jason@zx2c4.com>,
	Rik van Riel <riel@redhat.com>, Laura Abbott <labbott@redhat.com>,
	Greg KH <greg@kroah.com>, Andy Lutomirski <luto@kernel.org>,
	linux-mm@kvack.org, linux-arch@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	kernel-hardening@lists.openwall.com
Subject: [PATCH 0/3] exec: Pin stack limit during exec
Date: Tue,  9 Jan 2018 12:23:00 -0800	[thread overview]
Message-ID: <1515529383-35695-1-git-send-email-keescook@chromium.org> (raw)

Attempts to solve problems with the stack limit changing during exec             continue to be frustrated[1][2]. In addition to the specific issues              around the Stack Clash family of flaws, Andy Lutomirski pointed out[3]
other places during exec where the stack limit is used and is assumed
to be unchanging. Given the many places it gets used and the fact that
it can be manipulated/raced via setrlimit() and prlimit(), I think the
only way to handle this is to move away from the "current" view of the
stack limit and instead attach it to the bprm, and plumb this down into
the functions that need to know the stack limits. This series implements
the approach. I'd be curious to hear feedback on alternatives.

Thanks!

-Kees

[1] 04e35f4495dd ("exec: avoid RLIMIT_STACK races with prlimit()")
[2] 779f4e1c6c7c ("Revert "exec: avoid RLIMIT_STACK races with prlimit()"")
[3] to security@kernel.org, "Subject: existing rlimit races?"

WARNING: multiple messages have this Message-ID (diff)
From: Kees Cook <keescook@chromium.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Kees Cook <keescook@chromium.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Michal Hocko <mhocko@kernel.org>,
	Ben Hutchings <ben@decadent.org.uk>, Willy Tarreau <w@1wt.eu>,
	Hugh Dickins <hughd@google.com>, Oleg Nesterov <oleg@redhat.com>,
	"Jason A. Donenfeld" <Jason@zx2c4.com>,
	Rik van Riel <riel@redhat.com>, Laura Abbott <labbott@redhat.com>,
	Greg KH <greg@kroah.com>, Andy Lutomirski <luto@kernel.org>,
	linux-mm@kvack.org, linux-arch@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	kernel-hardening@lists.openwall.com
Subject: [PATCH 0/3] exec: Pin stack limit during exec
Date: Tue,  9 Jan 2018 12:23:00 -0800	[thread overview]
Message-ID: <1515529383-35695-1-git-send-email-keescook@chromium.org> (raw)

Attempts to solve problems with the stack limit changing during exec             continue to be frustrated[1][2]. In addition to the specific issues              around the Stack Clash family of flaws, Andy Lutomirski pointed out[3]
other places during exec where the stack limit is used and is assumed
to be unchanging. Given the many places it gets used and the fact that
it can be manipulated/raced via setrlimit() and prlimit(), I think the
only way to handle this is to move away from the "current" view of the
stack limit and instead attach it to the bprm, and plumb this down into
the functions that need to know the stack limits. This series implements
the approach. I'd be curious to hear feedback on alternatives.

Thanks!

-Kees

[1] 04e35f4495dd ("exec: avoid RLIMIT_STACK races with prlimit()")
[2] 779f4e1c6c7c ("Revert "exec: avoid RLIMIT_STACK races with prlimit()"")
[3] to security@kernel.org, "Subject: existing rlimit races?"

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Kees Cook <keescook@chromium.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Kees Cook <keescook@chromium.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Michal Hocko <mhocko@kernel.org>,
	Ben Hutchings <ben@decadent.org.uk>, Willy Tarreau <w@1wt.eu>,
	Hugh Dickins <hughd@google.com>, Oleg Nesterov <oleg@redhat.com>,
	"Jason A. Donenfeld" <Jason@zx2c4.com>,
	Rik van Riel <riel@redhat.com>, Laura Abbott <labbott@redhat.com>,
	Greg KH <greg@kroah.com>, Andy Lutomirski <luto@kernel.org>,
	linux-mm@kvack.org, linux-arch@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	kernel-hardening@lists.openwall.com
Subject: [kernel-hardening] [PATCH 0/3] exec: Pin stack limit during exec
Date: Tue,  9 Jan 2018 12:23:00 -0800	[thread overview]
Message-ID: <1515529383-35695-1-git-send-email-keescook@chromium.org> (raw)

Attempts to solve problems with the stack limit changing during exec             continue to be frustrated[1][2]. In addition to the specific issues              around the Stack Clash family of flaws, Andy Lutomirski pointed out[3]
other places during exec where the stack limit is used and is assumed
to be unchanging. Given the many places it gets used and the fact that
it can be manipulated/raced via setrlimit() and prlimit(), I think the
only way to handle this is to move away from the "current" view of the
stack limit and instead attach it to the bprm, and plumb this down into
the functions that need to know the stack limits. This series implements
the approach. I'd be curious to hear feedback on alternatives.

Thanks!

-Kees

[1] 04e35f4495dd ("exec: avoid RLIMIT_STACK races with prlimit()")
[2] 779f4e1c6c7c ("Revert "exec: avoid RLIMIT_STACK races with prlimit()"")
[3] to security@kernel.org, "Subject: existing rlimit races?"

             reply	other threads:[~2018-01-09 20:23 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-09 20:23 Kees Cook [this message]
2018-01-09 20:23 ` [kernel-hardening] [PATCH 0/3] exec: Pin stack limit during exec Kees Cook
2018-01-09 20:23 ` Kees Cook
2018-01-09 20:23 ` [PATCH 1/3] exec: Pass stack rlimit into mm layout functions Kees Cook
2018-01-09 20:23   ` [kernel-hardening] " Kees Cook
2018-01-09 20:23   ` Kees Cook
2018-01-09 20:23 ` [PATCH 2/3] exec: Introduce finalize_exec() before start_thread() Kees Cook
2018-01-09 20:23   ` [kernel-hardening] " Kees Cook
2018-01-09 20:23   ` Kees Cook
2018-01-09 20:23 ` [PATCH 3/3] exec: Pin stack limit during exec Kees Cook
2018-01-09 20:23   ` [kernel-hardening] " Kees Cook
2018-01-09 20:23   ` Kees Cook
2018-01-19 22:49 ` [PATCH 0/3] " Kees Cook
2018-01-19 22:49   ` [kernel-hardening] " Kees Cook
2018-01-19 22:49   ` Kees Cook
2018-01-20  1:12   ` [kernel-hardening] " David Windsor
2018-01-20  1:12     ` David Windsor
2018-01-21  1:22     ` Kees Cook
2018-01-21  1:22       ` 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=1515529383-35695-1-git-send-email-keescook@chromium.org \
    --to=keescook@chromium.org \
    --cc=Jason@zx2c4.com \
    --cc=akpm@linux-foundation.org \
    --cc=ben@decadent.org.uk \
    --cc=greg@kroah.com \
    --cc=hughd@google.com \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=labbott@redhat.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=luto@kernel.org \
    --cc=mhocko@kernel.org \
    --cc=oleg@redhat.com \
    --cc=riel@redhat.com \
    --cc=torvalds@linux-foundation.org \
    --cc=w@1wt.eu \
    /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.