lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 16 Apr 2014 11:13:31 -0700
From:	Andy Lutomirski <luto@...capital.net>
To:	Vivek Goyal <vgoyal@...hat.com>
Cc:	Simo Sorce <ssorce@...hat.com>, David Miller <davem@...emloft.net>,
	Tejun Heo <tj@...nel.org>, Daniel Walsh <dwalsh@...hat.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	lpoetter@...hat.com, cgroups@...r.kernel.org, kay@...hat.com,
	Network Development <netdev@...r.kernel.org>
Subject: Re: [PATCH 2/2] net: Implement SO_PASSCGROUP to enable passing cgroup path

On Wed, Apr 16, 2014 at 11:06 AM, Vivek Goyal <vgoyal@...hat.com> wrote:
> On Wed, Apr 16, 2014 at 09:31:25AM -0700, Andy Lutomirski wrote:
> I am not sure how same issue with happen with cgroups. In the case of
> socket example, you are forcing a setuid program to write to standard
> output and that setuid program will run in same cgroup as caller and
> will have same cgroup as caller. So even if somebody was using cgroup
> information for authentication, atleast in this particular case it
> will not be a problem. Both unpriviliged and priviliged programs has
> same cgroups.
>

I'm not sure that there's an actual attackable program.  But I also
see no reason to be convinced that there isn't one, and the problem
can easily be avoided by requiring programs to explicitly ask to send
their cgroup.

>>
>> >
>> > The only one that *may* be reasonable is the "secret" cgroup name one,
>> > however nobody seem to come up with a reason why it is legitimate to
>> > allow to keep cgroup names secret.
>> >
>> > And if you can come up with such a good reason the SO_NOPASSCGROUP
>> > option seem the right solution.
>> >
>> >> This ABI is especially tricky because programs will use it even if
>> >> they don't explicitly try to.  So just adding the ABI may break
>> >> existing assumptions that are relevant to security or correctness.
>> >
>> > It's not clear to me what you mean by this, either you explicitly use
>> > SO_PASSCGROUP or not, it's not like you can involuntarily add a flag ...
>> >
>>
>> The issue here is that the receiver sets SO_(PASS|PEER)CGROUP, forcing
>> the sender to identify or authenticate itself.  The sender might not
>> want to identify itself.  Even if you don't buy any secrecy arguments,
>> the sender might not intend to authenticate.  Certainly no existing
>> callers of connect or write intend to authenticate using their cgroup,
>> since current kernels don't have those semantics.
>
> Ok, so passing cgroup information is not necessarily a problem as long
> as it is not used for authentication. So say somebody is just logging
> all the client request and which cgroup client was in, that should not
> be a problem.

Do you consider correct attribution of logging messages to be
important?  If so, then this is a kind of authentication, albeit one
where the impact of screwing it up is a bit lower.

>
> I agree that before somebody uses cgroup information for authentication
> purposes, may be there needs to be a bigger debate whether this info
> can be used safely for authentication purposes or not and in what
> circumstances it is safe to use for authentication.

I thought that the original intended user of these patches was SSSD.
I have no idea what SSSD wanted them for, but I think it may better.

>
> But that does not mean that API to pass the cgroup information around is
> wrong.
>

It may not be wrong, but it might be extremely difficult or impossible
to use it safely.  I think that's something to avoid.

--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

Powered by Openwall GNU/*/Linux Powered by OpenVZ