Re: [PATCH] binfmt_elf: Move brk out of mmap when doing direct loader exec

2019-04-22 Thread Kees Cook
On Thu, Apr 18, 2019 at 7:57 AM Guenter Roeck wrote: > > On Mon, Apr 15, 2019 at 09:23:20PM -0700, Kees Cook wrote: > > Commit eab09532d400 ("binfmt_elf: use ELF_ET_DYN_BASE only for PIE"), > > made changes in the rare case when the ELF loader was directly invoked > > (e.g to set a

Re: [PATCH] binfmt_elf: Move brk out of mmap when doing direct loader exec

2019-04-18 Thread Guenter Roeck
On Mon, Apr 15, 2019 at 09:23:20PM -0700, Kees Cook wrote: > Commit eab09532d400 ("binfmt_elf: use ELF_ET_DYN_BASE only for PIE"), > made changes in the rare case when the ELF loader was directly invoked > (e.g to set a non-inheritable LD_LIBRARY_PATH, testing new versions of > the loader), by

Re: [PATCH] binfmt_elf: Move brk out of mmap when doing direct loader exec

2019-04-16 Thread Andrew Morton
On Tue, 16 Apr 2019 18:14:00 -0500 Kees Cook wrote: > On Tue, Apr 16, 2019 at 6:04 PM Andrew Morton > wrote: > > > > > > > > Reported-by: Ali Saidi > > > Link: > > > https://lkml.kernel.org/r/CAGXu5jJ5sj3emOT2QPxQkNQk0qbU6zEfu9=omfhx_p0nckp...@mail.gmail.com > > > Fixes: eab09532d400

Re: [PATCH] binfmt_elf: Move brk out of mmap when doing direct loader exec

2019-04-16 Thread Kees Cook
On Tue, Apr 16, 2019 at 6:04 PM Andrew Morton wrote: > > On Mon, 15 Apr 2019 21:23:20 -0700 Kees Cook wrote: > > > Commit eab09532d400 ("binfmt_elf: use ELF_ET_DYN_BASE only for PIE"), > > made changes in the rare case when the ELF loader was directly invoked > > (e.g to set a non-inheritable

Re: [PATCH] binfmt_elf: Move brk out of mmap when doing direct loader exec

2019-04-16 Thread Andrew Morton
On Mon, 15 Apr 2019 21:23:20 -0700 Kees Cook wrote: > Commit eab09532d400 ("binfmt_elf: use ELF_ET_DYN_BASE only for PIE"), > made changes in the rare case when the ELF loader was directly invoked > (e.g to set a non-inheritable LD_LIBRARY_PATH, testing new versions of > the loader), by moving

[PATCH] binfmt_elf: Move brk out of mmap when doing direct loader exec

2019-04-15 Thread Kees Cook
Commit eab09532d400 ("binfmt_elf: use ELF_ET_DYN_BASE only for PIE"), made changes in the rare case when the ELF loader was directly invoked (e.g to set a non-inheritable LD_LIBRARY_PATH, testing new versions of the loader), by moving into the mmap region to avoid both ET_EXEC and PIE binaries.