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]
Date:   Mon, 27 Nov 2017 15:31:52 -0800
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     David Howells <dhowells@...hat.com>
Cc:     Fengguang Wu <fengguang.wu@...el.com>,
        Kees Cook <keescook@...omium.org>,
        Josh Boyer <jwboyer@...hat.com>,
        Johannes Berg <johannes.berg@...el.com>,
        Xiaolong Ye <xiaolong.ye@...el.com>,
        LKML <linux-kernel@...r.kernel.org>, LKP <lkp@...org>
Subject: Re: d7be102f29 ("cfg80211: initialize regulatory keys/database
 later"): kernel BUG at crypto/asymmetric_keys/public_key.c:80!

On Mon, Nov 27, 2017 at 3:25 PM, David Howells <dhowells@...hat.com> wrote:
>
> This function has a list of requisite parameters for the caller:

.. and so what?

When you call "free()", that has a requisite parameter: the data to
free. If you don't supply it, we should BUG_ON(), right?

No. Instead we do the sane thing and just do

        if (unlikely(ZERO_OR_NULL_PTR(x)))
                return;

and it's all good.

> If you fail to obtain any one of these parameters, you can't use this function
> and you should have errored out before calling this function.

Again, what is the *advantage* of being a complete ass-wipe and saying
"f*ck you", when it's less code to just say "that didn't work"?

Because one of those BUG_ON's clearly did happen.

So exactly what is your excuse for killing the machine instead of just
saying "yeah, can't validate that"?

                  Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ