lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHk-=wg_aYT+Yti5nY4_a7FgUa0k3Uip3MXezR=8HKaRMFAV4Q@mail.gmail.com>
Date:   Fri, 15 Feb 2019 09:11:55 -0800
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     Kees Cook <keescook@...omium.org>
Cc:     Oleg Nesterov <oleg@...hat.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Samuel Dionne-Riel <samuel@...nne-riel.com>,
        Richard Weinberger <richard.weinberger@...il.com>,
        Graham Christensen <graham@...hamc.com>,
        Michal Hocko <mhocko@...e.com>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3] exec: load_script: Do not exec truncated interpreter path

On Fri, Feb 15, 2019 at 9:01 AM Kees Cook <keescook@...omium.org> wrote:
>
> The !*first will never hit here (since it's been checked to be either
> ' ' or '\t', and if first == last it's whitespace all the way, so we
> could just return true here to bail out early (there's no interpreter
> at all, so we want to -ENOEXEC still).

Correct.

You do need the !*first test, but it needs to be after the loop
(because the next loop skips over the first non-space thing we found).

               Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ