From: Andrew Morton <akpm@linux-foundation.org>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
security@kernel.org
Subject: Re: [PATCH] ELF: warn if process starts with executable stack
Date: Mon, 18 Nov 2019 12:54:57 -0800 [thread overview]
Message-ID: <20191118125457.778e44dfd4740d24795484c7@linux-foundation.org> (raw)
In-Reply-To: <20191118145114.GA9228@avx2>
On Mon, 18 Nov 2019 17:51:15 +0300 Alexey Dobriyan <adobriyan@gmail.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);
next prev parent reply other threads:[~2019-11-18 20:54 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-18 14:51 [PATCH] ELF: warn if process starts with executable stack Alexey Dobriyan
2019-11-18 14:51 ` Alexey Dobriyan
2019-11-18 17:13 ` Ben Dooks
2019-11-18 17:13 ` Ben Dooks
2019-11-18 20:54 ` Andrew Morton [this message]
2019-11-18 20:54 ` Andrew Morton
2019-11-18 21:36 ` Alexey Dobriyan
2019-11-18 21:36 ` Alexey Dobriyan
2019-11-18 21:52 ` [PATCH] exec: " Alexey Dobriyan
2019-11-18 21:52 ` Alexey Dobriyan
2019-11-19 5:32 ` Dan Carpenter
2019-11-19 5:32 ` Dan Carpenter
2019-11-20 19:17 ` Will Deacon
2019-11-20 19:17 ` Will Deacon
2019-11-20 20:28 ` Eric W. Biederman
2019-11-20 20:28 ` Eric W. Biederman
2019-11-21 9:38 ` Will Deacon
2019-11-21 9:38 ` Will Deacon
2019-12-08 16:43 ` Alexey Dobriyan
2019-12-08 16:43 ` Alexey Dobriyan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191118125457.778e44dfd4740d24795484c7@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=adobriyan@gmail.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=security@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox