mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
netns: Don't leak others' openreq-s in proc
The /proc/net/tcp leaks openreq sockets from other namespaces. Signed-off-by: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
4cb6a614ba
commit
8475ef9fd1
1 changed files with 3 additions and 1 deletions
|
@ -2043,7 +2043,9 @@ static void *listening_get_next(struct seq_file *seq, void *cur)
|
|||
}
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue