From: Andi Kleen <ak@linux.intel.com>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Kees Cook <keescook@chromium.org>, Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Hellstrom <thellstrom@vmware.com>,
Daniel Micay <danielmicay@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kref: Avoid null pointer dereference after WARN
Date: Tue, 27 Jun 2017 07:49:18 -0700 [thread overview]
Message-ID: <20170627144918.GG23705@tassilo.jf.intel.com> (raw)
In-Reply-To: <20170627110013.GA3026@zx2c4.com>
On Tue, Jun 27, 2017 at 01:00:16PM +0200, Jason A. Donenfeld wrote:
> On Tue, Jun 27, 2017 at 09:06:26AM +0200, Greg Kroah-Hartman wrote:
> > I remember one complaint was that WARN_ON was "huge" and this bloated
> > the kernel code a lot. But then that got fixed up. Is BUG_ON going to
> > cause the same complaint again?
>
> Complaint or not, I'm pretty sure using BUG_ON here is the right
> behavior. If removing it will result in a null pointer dereference (and
> subsequent function call), that's bad news bears, especially on systems
> with a zero mmap_min_addr or combined with other bugs.
>
> If somehow a driver manages to pass a NULL as the release function,
> something is really messed up and the kernel should "safely" panic
> instead.
Please post data on the kernel text change from this patch.
In general I'm sceptical on the value of changes like this. Why
is release so important to check compared to other places?
Is there any data how many security holes this would have
caught? Please no hand waving. A lot of the recent
security patches seem to have gone in with just a lot of
hand waving and security theater
("It's in gr-security, so it must be great")
In general accountability is important, especially in security
-Andi
next prev parent reply other threads:[~2017-06-27 14:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-27 3:52 [PATCH] kref: Avoid null pointer dereference after WARN Kees Cook
2017-06-27 7:06 ` Greg Kroah-Hartman
2017-06-27 11:00 ` Jason A. Donenfeld
2017-06-27 14:49 ` Andi Kleen [this message]
2017-06-27 19:11 ` Jason A. Donenfeld
2017-06-27 19:29 ` Andi Kleen
2017-06-28 11:26 ` Michal Hocko
2017-06-27 18:34 ` Kees Cook
2017-07-05 15:37 ` Peter Zijlstra
2017-06-28 11:57 ` Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170627144918.GG23705@tassilo.jf.intel.com \
--to=ak@linux.intel.com \
--cc=Jason@zx2c4.com \
--cc=danielmicay@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=thellstrom@vmware.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox