]> git.baikalelectronics.ru Git - kernel.git/commit
net/unix: don't show information about sockets from other namespaces
authorAndrei Vagin <avagin@openvz.org>
Wed, 25 Oct 2017 17:16:42 +0000 (10:16 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 26 Oct 2017 01:05:59 +0000 (10:05 +0900)
commit36213d07da82a1247a9714919bd283b016e02395
tree03ee96f8ce933646840e243195cf69af8cf7575a
parent936794d8db528f74c08a894965da0f62e9dafc28
net/unix: don't show information about sockets from other namespaces

socket_diag shows information only about sockets from a namespace where
a diag socket lives.

But if we request information about one unix socket, the kernel don't
check that its netns is matched with a diag socket namespace, so any
user can get information about any unix socket in a system. This looks
like a bug.

v2: add a Fixes tag

Fixes: ec8b52e53910 ("net: make sock diag per-namespace")
Signed-off-by: Andrei Vagin <avagin@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/unix/diag.c