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


Groups > linux.kernel > #1684028

[PATCH v2 0/8] exec: Use sane stack rlimit under secureexec

From Kees Cook <keescook@chromium.org>
Newsgroups linux.kernel
Subject [PATCH v2 0/8] exec: Use sane stack rlimit under secureexec
Date 2017-07-10 10:00 +0200
Message-ID <u1BLP-2bz-7@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


As discussed with Linus and Andy, we need to reset the stack rlimit
before we do memory layouts when execing a privilege-gaining (e.g.
setuid) program. This moves security_bprm_secureexec() earlier (with
required changes), and then lowers the stack limit when appropriate.

As a side-effect, dumpability and pdeath_signal clearing is expanded
to cover LSM definitions of secureexec (and Smack can drop its special
handler for pdeath_signal clearing).

I'd appreciate some extra eyes on this to make sure this isn't
broken in some special way. I couldn't find anything that _depended_
on security_bprm_secureexec() being called late.

Thanks!

-Kees

v2:
- fix missed current_security() uses in LSMs.
- research/consolidate dumpability setting logic
- research/consolidate pdeath_signal clearing logic
- split up logical steps a little more for easier review (and bisection)
- fix some old broken comments

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


Thread

[PATCH v2 0/8] exec: Use sane stack rlimit under secureexec Kees Cook <keescook@chromium.org> - 2017-07-10 10:00 +0200
  [PATCH v2 2/8] exec: Move security_bprm_secureexec() earlier Kees Cook <keescook@chromium.org> - 2017-07-10 10:00 +0200
    Re: [PATCH v2 2/8] exec: Move security_bprm_secureexec() earlier ebiederm@xmission.com (Eric W. Biederman) - 2017-07-10 11:10 +0200
      Re: [PATCH v2 2/8] exec: Move security_bprm_secureexec() earlier Kees Cook <keescook@chromium.org> - 2017-07-10 18:10 +0200
        Re: [PATCH v2 2/8] exec: Move security_bprm_secureexec() earlier Kees Cook <keescook@chromium.org> - 2017-07-11 04:10 +0200
          Re: [PATCH v2 2/8] exec: Move security_bprm_secureexec() earlier Kees Cook <keescook@chromium.org> - 2017-07-18 08:50 +0200
  [PATCH v2 6/8] exec: Consolidate dumpability logic Kees Cook <keescook@chromium.org> - 2017-07-10 10:00 +0200
  [PATCH v2 3/8] exec: Use secureexec for setting dumpability Kees Cook <keescook@chromium.org> - 2017-07-10 10:00 +0200
  [PATCH v2 4/8] exec: Use secureexec for clearing pdeath_signal Kees Cook <keescook@chromium.org> - 2017-07-10 10:10 +0200

csiph-web