Patch "net/unix: don't show information about sockets from other namespaces" has been added to the 4.13-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
net/unix: don't show information about sockets from other namespaces
to the 4.13-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
net-unix-don-t-show-information-about-sockets-from-other-namespaces.patch
and it can be found in the queue-4.13 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Wed Nov 15 17:25:34 CET 2017
From: Andrei Vagin <[email protected]>
Date: Wed, 25 Oct 2017 10:16:42 -0700
Subject: net/unix: don't show information about sockets from other namespaces
From: Andrei Vagin <[email protected]>
[ Upstream commit 0f5da659d8f1810f44de14acf2c80cd6499623a0 ]
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
--- net/unix/diag.c | 2 ++ 1 file changed, 2 insertions(+)
net/unix/diag.c +2 -0
@@ -257,6 +257,8 @@ static int unix_diag_get_exact(struct sk err = -ENOENT ;if (sk ==NULL ) goto out_nosk; +if (!net_eq (sock_net (sk), net)) + goto out; err =sock_diag_check_cookie (sk, req->udiag_cookie);if (err)
Patches currently in stable-queue which might be from [email protected] are
queue-4.13/net-unix-don-t-show-information-about-sockets-from-other-namespaces.patch