linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Waiman Long <longman@redhat.com>
Cc: "Luis R. Rodriguez" <mcgrof@kernel.org>,
	Kees Cook <keescook@chromium.org>,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	Al Viro <viro@zeniv.linux.org.uk>
Subject: Re: [PATCH 2/3] sysctl: Warn when a clamped sysctl parameter is set out of range
Date: Tue, 20 Feb 2018 15:17:05 -0800	[thread overview]
Message-ID: <20180220151705.8b4519f105db8f5c119015f0@linux-foundation.org> (raw)
In-Reply-To: <1519059231-2456-3-git-send-email-longman@redhat.com>

On Mon, 19 Feb 2018 11:53:50 -0500 Waiman Long <longman@redhat.com> wrote:

> Even with clamped sysctl parameters, it is still not that straight
> forward to figure out the exact range of those parameters. One may
> try to write extreme parameter values to see if they get clamped.
> To make it easier, a warning with the expected range will now be
> printed in the kernel ring buffer when a clamped sysctl parameter
> receives an out of range value.

This assumes that do_proc_dointvec_minmax_conv() and
do_proc_douintvec_minmax_conv() are only ever called by privileged
userspace.  Because we mustn't give unprivileged applications a way to
spam the kernel logs.

That's presumably true in the case of the caller you just added, but I
don't see what we can do to guarantee this in the future, so perhaps we
should add some permission check to the pr_warn()?

  reply	other threads:[~2018-02-20 23:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-19 16:53 [PATCH 0/3] ipc: Clamp msgmni and shmmni to the real IPC_MNI limit Waiman Long
2018-02-19 16:53 ` [PATCH 1/3] sysctl: Add range clamping intvec helper functions Waiman Long
2018-02-20 23:41   ` Luis R. Rodriguez
2018-02-21 16:58     ` Waiman Long
2018-02-19 16:53 ` [PATCH 2/3] sysctl: Warn when a clamped sysctl parameter is set out of range Waiman Long
2018-02-20 23:17   ` Andrew Morton [this message]
2018-02-20 23:55     ` Luis R. Rodriguez
2018-02-21  1:26     ` Kees Cook
2018-02-21 15:33       ` Waiman Long
2018-02-21 15:24     ` Waiman Long
2018-02-19 16:53 ` [PATCH 3/3] ipc: Clamp msgmni and shmmni to the real IPC_MNI limit Waiman Long

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=20180220151705.8b4519f105db8f5c119015f0@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=keescook@chromium.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=mcgrof@kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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).