Re: get_arg_page() && ptr_size accounting

From: Oleg Nesterov
Date: Mon Sep 10 2018 - 13:21:16 EST


On 09/10, Kees Cook wrote:
>
> On Mon, Sep 10, 2018 at 9:41 AM, Kees Cook <keescook@xxxxxxxxxxxx> wrote:
> > On Mon, Sep 10, 2018 at 5:29 AM, Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
> >> Hi Kees,
> >>
> >> I was thinking about backporting the commit 98da7d08850fb8bde
> >> ("fs/exec.c: account for argv/envp pointers"), but I am not sure
> >> I understand it...
>
> BTW, if you backport that, please get the rest associated with the
> various Stack Clash related weaknesses:

may be...

> da029c11e6b1 exec: Limit arg stack to at most 75% of _STK_LIM

and I have to admit that I do not understand this patch at all, the
changelog explains nothing.

Could you explain what this patch actually prevents from? Especially
now that we have stack_guard_gap?

Oleg.