linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/8] exec: Use sane stack rlimit under secureexec
@ 2017-07-10  7:57 Kees Cook
  2017-07-10  7:57 ` [PATCH v2 1/8] exec: Correct comments about "point of no return" Kees Cook
                   ` (7 more replies)
  0 siblings, 8 replies; 18+ messages in thread
From: Kees Cook @ 2017-07-10  7:57 UTC (permalink / raw)
  To: linux-security-module

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

--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2017-07-18 13:42 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-10  7:57 [PATCH v2 0/8] exec: Use sane stack rlimit under secureexec Kees Cook
2017-07-10  7:57 ` [PATCH v2 1/8] exec: Correct comments about "point of no return" Kees Cook
2017-07-10  8:46   ` Eric W. Biederman
2017-07-10 16:04     ` Kees Cook
     [not found]       ` <87pod8mdad.fsf@xmission.com>
2017-07-18  6:39         ` Kees Cook
2017-07-18 13:12           ` Eric W. Biederman
2017-07-18 13:42             ` Kees Cook
2017-07-10  7:57 ` [PATCH v2 2/8] exec: Move security_bprm_secureexec() earlier Kees Cook
2017-07-10  8:57   ` Eric W. Biederman
2017-07-10 16:06     ` Kees Cook
     [not found]       ` <87bmosmcqv.fsf@xmission.com>
2017-07-11  2:07         ` Kees Cook
2017-07-18  6:45           ` Kees Cook
2017-07-10  7:57 ` [PATCH v2 3/8] exec: Use secureexec for setting dumpability Kees Cook
2017-07-10  7:57 ` [PATCH v2 4/8] exec: Use secureexec for clearing pdeath_signal Kees Cook
2017-07-10  7:57 ` [PATCH v2 5/8] smack: Remove redundant pdeath_signal clearing Kees Cook
2017-07-10  7:57 ` [PATCH v2 6/8] exec: Consolidate dumpability logic Kees Cook
2017-07-10  7:57 ` [PATCH v2 7/8] exec: Consolidate pdeath_signal clearing Kees Cook
2017-07-10  7:57 ` [PATCH v2 8/8] exec: Use sane stack rlimit under secureexec Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).