From: Jiri Slaby <jslaby@suse•cz>
To: David Miller <davem@davemloft•net>
Cc: ben@decadent•org.uk, akpm@linux-foundation•org, jeffm@suse•com,
netdev@vger•kernel.org, isdn4linux@koppen•de,
isdn@linux-pingi•de, sergei.shtylyov@cogentembedded•com
Subject: Re: [patch 2/4] mISDN: add support for group membership check
Date: Fri, 20 Sep 2013 18:14:28 +0200 [thread overview]
Message-ID: <523C7464.3070007@suse.cz> (raw)
In-Reply-To: <20130920.115634.1931451843075283025.davem@davemloft.net>
On 09/20/2013 05:56 PM, David Miller wrote:
> From: Jiri Slaby <jslaby@suse•cz>
> Date: Fri, 20 Sep 2013 15:44:33 +0200
>
>> On 09/15/2013 01:28 AM, Ben Hutchings wrote:
>>>> @@ -694,6 +699,10 @@ base_sock_ioctl(struct socket *sock, uns
>>>> case IMSETDEVNAME: { struct mISDN_devrename dn; + if
>>>> (!capable(CAP_SYS_ADMIN) && + !gid_eq(misdn_permitted_gid,
>>>> current_gid()) && + !in_group_p(misdn_permitted_gid)) +
>>>> return -EPERM; if (copy_from_user(&dn, (void __user *)arg,
>>>> sizeof(dn))) { err = -EFAULT;
>>>
>>> This seems to be the important bit: renaming of devices (if allowed
>>> at all) ought to be limited to CAP_SYS_ADMIN or possibly
>>> CAP_NET_ADMIN. But why should the group that is allowed to use
>>> mISDN data sockets also be allowed to do this?
>>
>> This is based on an old patch we are dragging in SUSE since 2009:
>> http://www.isdn4linux.de/pipermail/isdn4linux/2009-December/004493.html
>> https://bugzilla.novell.com/show_bug.cgi?id=564423
>>
>> The whole point of the gid-based access was to still allow some user
>> group to manipulate the device in an arbitrary way.
>>
>> So if everybody agrees I will just disallow rename to
>> non-CAP_NET_ADMIN users and we are done?
>
> No we are not done, sorry.
>
> Having a device specific module parameter for this is wrong on several
> fundamental levels.
What I'm suggesting is just to put a !capable(CAP_NET_ADMIN) test into
the rename path and nothing more.
--
js
suse labs
next prev parent reply other threads:[~2013-09-20 16:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-13 21:52 [patch 2/4] mISDN: add support for group membership check akpm
2013-09-14 0:00 ` David Miller
2013-09-14 23:28 ` Ben Hutchings
2013-09-20 13:44 ` Jiri Slaby
2013-09-20 15:56 ` David Miller
2013-09-20 16:14 ` Jiri Slaby [this message]
2013-09-20 16:15 ` David Miller
2013-09-20 16:18 ` Jiri Slaby
2013-09-20 16:21 ` David Miller
2013-09-20 16:30 ` Jiri Slaby
2013-09-21 15:36 ` Karsten Keil
2013-09-20 16:30 ` Ben Hutchings
2013-09-20 17:14 ` David Miller
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=523C7464.3070007@suse.cz \
--to=jslaby@suse$(echo .)cz \
--cc=akpm@linux-foundation$(echo .)org \
--cc=ben@decadent$(echo .)org.uk \
--cc=davem@davemloft$(echo .)net \
--cc=isdn4linux@koppen$(echo .)de \
--cc=isdn@linux-pingi$(echo .)de \
--cc=jeffm@suse$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=sergei.shtylyov@cogentembedded$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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