Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1675403

Re: [tip:x86/mm] x86/mmap, ASLR: Do not treat unlimited-stack tasks as legacy mmap

From Jiri Kosina <jikos@kernel.org>
Newsgroups linux.kernel
Subject Re: [tip:x86/mm] x86/mmap, ASLR: Do not treat unlimited-stack tasks as legacy mmap
Date 2017-06-27 10:10 +0200
Message-ID <tWTJn-69e-9@gated-at.bofh.it> (permalink)
References <tSbQC-2Ni-11@gated-at.bofh.it> <tVxrA-3cr-33@gated-at.bofh.it> <tVydY-3t1-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[tip:x86/mm] x86/mmap, ASLR: Do not treat unlimited-stack tasks as  legacy mmap tip-bot for Michal Hocko <tipbot@zytor.com> - 2017-06-23 16:10 +0200
  Re: [tip:x86/mm] x86/mmap, ASLR: Do not treat unlimited-stack tasks  as legacy mmap Oleg Nesterov <oleg@redhat.com> - 2017-06-23 17:00 +0200
    Re: [tip:x86/mm] x86/mmap, ASLR: Do not treat unlimited-stack tasks  as legacy mmap Jiri Kosina <jikos@kernel.org> - 2017-06-27 10:10 +0200
      Re: [tip:x86/mm] x86/mmap, ASLR: Do not treat unlimited-stack tasks  as legacy mmap Oleg Nesterov <oleg@redhat.com> - 2017-06-27 16:30 +0200
        Re: [tip:x86/mm] x86/mmap, ASLR: Do not treat unlimited-stack tasks  as legacy mmap Jiri Kosina <jikos@kernel.org> - 2017-06-28 11:50 +0200
  Re: [tip:x86/mm] x86/mmap, ASLR: Do not treat unlimited-stack tasks  as legacy mmap Jiri Kosina <jikos@kernel.org> - 2017-06-23 22:40 +0200
  [tip:x86/mm] x86/mmap, ASLR: Do not treat unlimited-stack tasks as  legacy mmap tip-bot for Michal Hocko <tipbot@zytor.com> - 2017-06-24 08:50 +0200

csiph-web