netns: Don't leak others' openreq-s in proc
Subsystems (3)
PATCH 1/1 netns: Don't leak others' openreq-s in proc
The /proc/net/tcp leaks openreq sockets from other namespaces.
Signed-off-by Pavel Emelyanov <[email protected]>
---
net/ipv4/tcp_ipv4.c +3 -1
@@ -2043,7 +2043,9 @@ get_req: } get_sk:sk_nulls_for_each_from (sk, node) { -if (sk->sk_family == st->family &&net_eq (sock_net (sk), net)) { +if (!net_eq (sock_net (sk), net)) +continue ; +if (sk->sk_family == st->family) { cur = sk; goto out; }
From: Pavel Emelyanov <[email protected]>
Date: Mon, 22 Nov 2010 16:26:12 +0300
Quoted 3 lines
The
/proc/net/tcpleaks openreq sockets from other namespaces.Signed-off-by Pavel Emelyanov <[email protected]>
Applied to net-2.6, thanks!