Re: [PATCH v2] exec: load_script: Allow interpreter argument truncation

2019-02-14 Thread Linus Torvalds
On Thu, Feb 14, 2019 at 10:10 AM Kees Cook wrote:> > We certainly can, but we'll still need to fix the "don't exec a > truncated interpreter path" problem (which this fixes). > > I'm happy to do it as two steps instead: revert, then a separate fix > to land in the merge window? I think that's bet

Re: [PATCH v2] exec: load_script: Allow interpreter argument truncation

2019-02-14 Thread Kees Cook
On Thu, Feb 14, 2019 at 9:59 AM Linus Torvalds wrote: > > On Thu, Feb 14, 2019 at 8:43 AM Kees Cook wrote: > > > > This documents the parsing steps, and will fail to exec if the string was > > truncated with neither an end-of-line nor any trailing whitespace. > > Is there any reason why we don't

Re: [PATCH v2] exec: load_script: Allow interpreter argument truncation

2019-02-14 Thread Linus Torvalds
On Thu, Feb 14, 2019 at 8:43 AM Kees Cook wrote: > > This documents the parsing steps, and will fail to exec if the string was > truncated with neither an end-of-line nor any trailing whitespace. Is there any reason why we don't just revert 8099b047ecc4 ("exec: load_script: don't blindly truncate

Re: [PATCH v2] exec: load_script: Allow interpreter argument truncation

2019-02-14 Thread Oleg Nesterov
On 02/14, Kees Cook wrote: > > v2: > - fix 1-byte-too-early-bail-out in truncation detection (Oleg) > - add Samuel's "tested" tag Looks correct... but you know, I'll try to read this patch again tomorrow after sleep. And I can't believe this code can't be simplified... but let me repeat that I