mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Kosina <jikos@kernel.org>
To: Oleg Nesterov <oleg@redhat.com>
Cc: tip-bot for Michal Hocko <tipbot@zytor.com>,
	linux-tip-commits@vger.kernel.org, torvalds@linux-foundation.org,
	mingo@kernel.org, hpa@zytor.com, mhocko@suse.com,
	tglx@linutronix.de, davej@codemonkey.org.uk,
	peterz@infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [tip:x86/mm] x86/mmap, ASLR: Do not treat unlimited-stack tasks as legacy mmap
Date: Tue, 27 Jun 2017 10:00:23 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LSU.2.20.1706270958520.30709@cbobk.fhfr.pm> (raw)
In-Reply-To: <20170623145441.GB9388@redhat.com>

On Fri, 23 Jun 2017, Oleg Nesterov wrote:

> > We added a heuristics to treat applications with RLIMIT_STACK configured
> > to unlimited as legacy. This means:
> 
> To me this also means a minor security problem. The comment above
> PER_CLEAR_ON_SETID says "must be cleared upon setuid or setgid exec",
> but if you do "ulimit -s unlimited" before suid exec then
> ADDR_COMPAT_LAYOUT set by security checks will be ignored.

Could you please be a bit more specific here?

mmap_is_legacy() *first* checks for the ADDR_COMPAT_LAYOUT in the 
personality flags, and only then, if it's unset, RLIMIT_STACK comes to 
play.

Thanks,

-- 
Jiri Kosina
SUSE Labs

  reply	other threads:[~2017-06-27  8:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-14  8:22 [RFC PATCH] mmap, aslr: do not enforce legacy mmap on unlimited stacks Michal Hocko
2017-06-23  8:46 ` Michal Hocko
2017-06-23 14:02 ` [tip:x86/mm] x86/mmap, ASLR: Do not treat unlimited-stack tasks as legacy mmap tip-bot for Michal Hocko
2017-06-23 14:54   ` Oleg Nesterov
2017-06-27  8:00     ` Jiri Kosina [this message]
2017-06-27 14:22       ` Oleg Nesterov
2017-06-28  9:40         ` Jiri Kosina
2017-06-23 20:35   ` Jiri Kosina
2017-06-24  6:43   ` tip-bot for Michal Hocko

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=alpine.LSU.2.20.1706270958520.30709@cbobk.fhfr.pm \
    --to=jikos@kernel.org \
    --cc=davej@codemonkey.org.uk \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mhocko@suse.com \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=tipbot@zytor.com \
    --cc=torvalds@linux-foundation.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 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®