From: Kees Cook <keescook@chromium.org>
To: Luis Chamberlain <mcgrof@kernel.org>
Cc: Greg KH <gregkh@linuxfoundation.org>,
Christoph Hellwig <hch@lst.de>, Iurii Zaikin <yzaikin@google.com>,
Alexey Dobriyan <adobriyan@gmail.com>,
linux-mm@kvack.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sysctl: Make sure proc handlers can't expose heap memory
Date: Tue, 5 May 2020 16:23:14 -0700 [thread overview]
Message-ID: <202005051621.90DE28B@keescook> (raw)
In-Reply-To: <20200505220327.GV11244@42.do-not-panic.com>
On Tue, May 05, 2020 at 10:03:27PM +0000, Luis Chamberlain wrote:
> On Tue, May 05, 2020 at 01:41:44PM -0700, Kees Cook wrote:
> > Right -- while it'd be nice if the developer noticed it, it is _usually_
> > an unsuspecting end user (or fuzzer), in which case we absolutely want a
> > WARN (and not a BUG![1]) and have the situations handled gracefully, so
> > it can be reported and fixed.
>
> I've been using WARN*() for this exact purpose before, so I am as
> surprised as you are bout these concerns. However if we have folks
I don't see any mismatch here: it's not user-reachable, which is what
Greg said. WARN is for non-user-reachable "impossible situations". We
want to know if those can be hit (via bad API usage, races, etc). If
it's reachable from userspace, then it can't be a WARN() any more and
needs to be pr_warn().
> shipping with panic-on-warn this would be rather detrimental to our
> goals.
>
> Greg, are you aware of folks shipping with panic-on-warn on some products?
People shipping with panic_on_warn are expecting to panic for WARNs like
this. :P
--
Kees Cook
next prev parent reply other threads:[~2020-05-05 23:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-04 19:08 [PATCH] sysctl: Make sure proc handlers can't expose heap memory Kees Cook
2020-05-04 19:59 ` Luis Chamberlain
2020-05-04 20:32 ` Kees Cook
2020-05-04 21:59 ` Luis Chamberlain
2020-05-05 6:34 ` Greg KH
2020-05-05 20:41 ` Kees Cook
2020-05-05 22:03 ` Luis Chamberlain
2020-05-05 23:23 ` Kees Cook [this message]
2020-05-05 5:58 ` Christoph Hellwig
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=202005051621.90DE28B@keescook \
--to=keescook@chromium.org \
--cc=adobriyan@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hch@lst.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mcgrof@kernel.org \
--cc=yzaikin@google.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;
as well as URLs for NNTP newsgroup(s).