[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrUdhoNRf8xfXD9WXq6qk+oRy-BV0+T6fj0T3EQHMkO3Rg@mail.gmail.com>
Date: Thu, 8 May 2014 14:54:01 -0700
From: Andy Lutomirski <luto@...capital.net>
To: David Miller <davem@...emloft.net>
Cc: stephen@...workplumber.org,
"Jorge Boncompte [DTI2]" <jorge@...2.net>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Vivek Goyal <vgoyal@...hat.com>,
Simo Sorce <ssorce@...hat.com>,
"security@...nel.org" <security@...nel.org>,
Network Development <netdev@...r.kernel.org>,
"Serge E. Hallyn" <serge@...lyn.com>
Subject: Re: [PATCH 5/5] net: Use netlink_ns_capable to verify the permisions
of netlink messages
On Thu, May 8, 2014 at 2:52 PM, David Miller <davem@...emloft.net> wrote:
> From: Stephen Hemminger <stephen@...workplumber.org>
> Date: Thu, 8 May 2014 14:21:21 -0700
>
>> On Wed, 07 May 2014 19:45:14 -0400 (EDT)
>> David Miller <davem@...emloft.net> wrote:
>>
>>> From: Andy Lutomirski <luto@...capital.net>
>>> Date: Wed, 7 May 2014 16:01:33 -0700
>>>
>>> > On Wed, May 7, 2014 at 3:52 PM, David Miller <davem@...emloft.net> wrote:
>>> >> From: Andy Lutomirski <luto@...capital.net>
>>> >> Date: Wed, 7 May 2014 15:26:11 -0700
>>> >>
>>> >>> So what do we do? Check permissions on connect and then use the
>>> >>> cached result for send on a connected socket? Check permitted caps
>>> >>> instead of effective caps?
>>> >>
>>> >> It should create the socket after changing perms.
>>> >
>>> > I agree that it should, but it doesn't, and if these patches get
>>> > backported, things will break. OTOH, if the patches don't get
>>> > backported, things may still break, and we have a possibly rather
>>> > severe unfixed vulnerability.
>>>
>>> I think the kernel change is justified as the privilege allowance
>>> that happened before was very much unintentional and as you've
>>> shown us countless times a very real problem that we must fix.
>>
>> One of the problems here is that Quagga may generate millions of
>> netlink messages to change routes in response to link flap.
>> Raising/lowering the permissions around each request would have
>> a significant performance impact.
>
> What we want to matter are the permissions the process had when the
> socket was created/bound, after that you can drop privs and send
> netlink requests as you like.
I would agree if this were a brand new interface. Unfortunately,
there might be programs that assume it's okay to do things like
creating a non-O_CLOEXEC netlink socket, dropping privileges, and
execing.
--Andy
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists