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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161019142015.GG19539@ZenIV.linux.org.uk>
Date:   Wed, 19 Oct 2016 15:20:15 +0100
From:   Al Viro <viro@...IV.linux.org.uk>
To:     Leon Yu <chianglungyu@...il.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Kees Cook <keescook@...omium.org>,
        Oleg Nesterov <oleg@...hat.com>,
        Michal Hocko <mhocko@...e.com>,
        John Stultz <john.stultz@...aro.org>,
        Mateusz Guzik <mguzik@...hat.com>,
        Janis Danisevskis <jdanis@...gle.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] proc: fix NULL dereference when reading /proc/<pid>/auxv

On Wed, Oct 19, 2016 at 09:59:40PM +0800, Leon Yu wrote:
> Reading auxv of any kernel thread results in NULL pointer dereferencing in
> auxv_read() where mm can be NULL or even error code. Fix that by testing mm
> with IS_ERR_OR_NULL() helper. This is also the original behavior changed by
> recent commit c5317167854e ("proc: switch auxv to use of __mem_open()").

What the...  How can it be ERR_PTR(...) after it has passed __mem_open()?
I agree that we ought to check for NULL mm (the only question is whether it's
best done by failing open() or by treating the file as empty), but this
IS_ERR_OR_NULL() is pure cargo-cult, AFAICS.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ