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] [day] [month] [year] [list]
Date:   Thu, 17 Jan 2019 22:47:21 -0600
From:   ebiederm@...ssion.com (Eric W. Biederman)
To:     Andrew Lunn <andrew@...n.ch>
Cc:     Donald Sharp <sharpd@...ulusnetworks.com>, netdev@...r.kernel.org,
        David Ahern <dsa@...ulusnetworks.com>,
        Nicolas Dichtel <nicolas.dichtel@...nd.com>,
        Roopa Prabhu <roopa@...ulusnetworks.com>
Subject: Re: AF_UNIX sockets crossing namespace based boundaries

Andrew Lunn <andrew@...n.ch> writes:

> On Wed, Jan 02, 2019 at 10:22:36AM -0500, Donald Sharp wrote:
>> I am only creating a network namespace, but I don't think this changes
>> my core question.
>> 
>> Suppose I am running FRR/zebra in the default namespace and I startup
>> a BGP instance in namespace one.  BGP will connect to the default
>> namespaces zebra instance.
>
> Hi David.
>
> We are talking about AF_UNIX here. By default, the name of the socket
> is a path on a filesystem. So to me, netns plays no role here when you
> reference the socket via its filesystem name. The path exists in the
> filesystem namespace, and in your case with only netns, the same path
> exists in all your netns.
>
> Linux has multiple namespaces, which in theory should be
> orthogonal. However in practice, they do sometime overlap, and this is
> one example. There are other examples, /proc files are also netns
> unaware. It seems like having an object depend on two different
> namespaces at the same time is simply not supported.

To clarify.

It was a deliberate design choice to allow connecting to a af_unix
socket with a presence in a filesystem from other network namespaces.

We audited the code to ensure that, that case would work without
problems before actually allowing it.

Long story short.  If two processes can communicate through the
filesystem then we allow creating an af_unix socket in the filesystem
they can communicate through.

Eric

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ