public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <zbr@ioremap.net>
To: Lars Ellenberg <lars.ellenberg@linbit.com>
Cc: Philipp Reisner <philipp.reisner@linbit.com>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.com>
Subject: Re: [PATCH] connector: Allow permission checking in the receiver callbacks
Date: Wed, 30 Sep 2009 23:29:28 +0400	[thread overview]
Message-ID: <20090930192928.GA1315@ioremap.net> (raw)
In-Reply-To: <20090930132034.GE8032@barkeeper1-xen.linbit>

On Wed, Sep 30, 2009 at 03:20:35PM +0200, Lars Ellenberg (lars.ellenberg@linbit.com) wrote:
> Actually it is the basis for follow-up security fixes.
> 
> Without this, unprivileged user space is able to send arbitrary
> connector requests to kernel subsystems, which have no way to verify the
> privileges of the sender anymore, because that information, even though
> available at the netlink layer, has been dropped by the connector.

It is not. One can add some checks at receiving time which happens in
process context to get its credentials, but nothing in netlink itself
carry this info. Getting that connector schedules workqueue this ability
is lost.

> Once this is applied, the various in-kernel receiving connector
> callbacks can (and need to) add cap_raised(nsb->eff_cap, cap) where
> appropriate. For example, you don't want some guest user to be able to
> trigger a dst_del_node callback by sending a crafted netlink message,
> right?
> 
> So it _is_ a (design-) bug fix.
> Or am I missing something?

This patchset is not a bugfix, just a cleanup, since none in patchset
uses netlink_skb_parms and currently I see no users which are affected
by this behaviour in the mainline branch (not counting staging tree).

But if proposed configuration changes for DM are on the way, then I
agree and they should force this patchset into the tree as a bugfix.

-- 
	Evgeniy Polyakov

  reply	other threads:[~2009-09-30 19:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-29 14:48 [PATCH] connector: Allow permission checking in the receiver callbacks Philipp Reisner
2009-09-29 14:48 ` [PATCH] connector: Keep the skb in cn_callback_data Philipp Reisner
2009-09-29 14:48   ` [PATCH] connector: Provide the sender's credentials to the callback Philipp Reisner
2009-09-29 14:48     ` [PATCH] connector/dm: Fixed a compilation warning Philipp Reisner
2009-09-29 14:48       ` [PATCH] connector: Removed the destruct_data callback since it is always kfree_skb() Philipp Reisner
2009-10-04 21:57         ` Andrew Morton
2009-10-04 21:53     ` [PATCH] connector: Provide the sender's credentials to the callback Andrew Morton
2009-10-04 21:50   ` [PATCH] connector: Keep the skb in cn_callback_data Andrew Morton
2009-09-30 11:20 ` [PATCH] connector: Allow permission checking in the receiver callbacks Evgeniy Polyakov
2009-09-30 13:20   ` Lars Ellenberg
2009-09-30 19:29     ` Evgeniy Polyakov [this message]
2009-10-01  8:01       ` Lars Ellenberg
2009-10-04 10:23         ` Evgeniy Polyakov

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=20090930192928.GA1315@ioremap.net \
    --to=zbr@ioremap.net \
    --cc=akpm@linux-foundation.com \
    --cc=lars.ellenberg@linbit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=philipp.reisner@linbit.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