Re: [PATCH v3] exec: load_script: Do not exec truncated interpreter path

From: Kees Cook
Date: Fri Feb 15 2019 - 11:28:42 EST


On Fri, Feb 15, 2019 at 8:18 AM Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
> WITHOUT '\n' at the end. If I read load_script() correctly it should work,
> so I think the 2nd for() loop should also reset "truncated" if *cp == '\0'.

Correct. My original v3 handles this correctly. I'll work on a version
with small inline helpers.

--
Kees Cook