[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191118125457.778e44dfd4740d24795484c7@linux-foundation.org>
Date: Mon, 18 Nov 2019 12:54:57 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Alexey Dobriyan <adobriyan@...il.com>
Cc: linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
security@...nel.org
Subject: Re: [PATCH] ELF: warn if process starts with executable stack
On Mon, 18 Nov 2019 17:51:15 +0300 Alexey Dobriyan <adobriyan@...il.com> wrote:
> PT_GNU_STACK is fail open design,
Not sure what this means. Please expand on the motivation for this
change.
> at least warn people that something
> isn't right.
People who use an executable stack get a kernel splat. How is that
useful?
> ...
>
> --- a/fs/exec.c
> +++ b/fs/exec.c
> @@ -762,6 +762,13 @@ int setup_arg_pages(struct linux_binprm *bprm,
> goto out_unlock;
> BUG_ON(prev != vma);
>
> +#ifdef CONFIG_MMU
> + if (vm_flags & VM_EXEC) {
> + pr_warn_once("process '%s'/%u started with executable stack\n",
> + current->comm, current->pid);
> + }
> +#endif
>
> /* Move stack pages down in memory. */
> if (stack_shift) {
> ret = shift_arg_pages(vma, stack_shift);
Powered by blists - more mailing lists