From: Andi Kleen <ak@linux.intel.com>
To: Kees Cook <keescook@chromium.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
"Jason A. Donenfeld" <Jason@zx2c4.com>,
Thomas Hellstrom <thellstrom@vmware.com>,
Daniel Micay <danielmicay@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] kref: Avoid null pointer dereference after WARN
Date: Tue, 27 Jun 2017 12:22:42 -0700 [thread overview]
Message-ID: <20170627192242.GI23705@tassilo.jf.intel.com> (raw)
In-Reply-To: <20170627190001.GA7811@beast>
On Tue, Jun 27, 2017 at 12:00:02PM -0700, Kees Cook wrote:
> From: Daniel Micay <danielmicay@gmail.com>
>
> The WARN_ON() checking for a NULL release pointer was (sensibly)
> removed in commit ec48c940da6c ("kref: remove WARN_ON for NULL release
> functions") since it offered no protection at all about calling a NULL
> release pointer. However, it should instead be a BUG() since continuing
> with a NULL release pointer will lead to a NULL pointer execution
> anyway. Systems with an incorrectly set mmap_min_addr and no PXN/SMEP
> protection would be left open to executing userspace memory.
There's still no evidence that actually would prevented anything
exploitable?
Who would actually set mman_min_addr incorrectly?
And of course near all modern systems have SMEP/SMAP.
Surviving minor problems is actually a feature, not a bug.
Linux was always better than other Unixes here, which
are typically far too panic happy.
If you really want it, I would rather add bug/panic_on_warn sysctl
that does this for every warning but make it default to off.
That would actually cover more cases.
I could see panic_on_warn being moderately useful for debugging
when crash dumps are enabled.
-Andi
next prev parent reply other threads:[~2017-06-27 19:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-27 19:00 [PATCH v2] kref: Avoid null pointer dereference after WARN Kees Cook
2017-06-27 19:15 ` Jason A. Donenfeld
2017-06-27 19:22 ` Andi Kleen [this message]
2017-06-27 19:26 ` Jason A. Donenfeld
2017-06-27 19:34 ` Kees Cook
2017-06-27 19:48 ` Andi Kleen
2017-06-27 20:16 ` Daniel Micay
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=20170627192242.GI23705@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.