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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADVnQyn-ELptMpumcbgn8yJ257imucaZen8n+xB2D1JkrzqSUA@mail.gmail.com>
Date:   Fri, 31 Jan 2020 14:49:48 -0500
From:   Neal Cardwell <ncardwell@...gle.com>
To:     Eric Dumazet <edumazet@...gle.com>
Cc:     "David S . Miller" <davem@...emloft.net>,
        netdev <netdev@...r.kernel.org>,
        Eric Dumazet <eric.dumazet@...il.com>,
        Marcelo Ricardo Leitner <mleitner@...hat.com>,
        Yuchung Cheng <ycheng@...gle.com>
Subject: Re: [PATCH net] tcp: clear tp->segs_{in|out} in tcp_disconnect()

On Fri, Jan 31, 2020 at 1:44 PM Eric Dumazet <edumazet@...gle.com> wrote:
>
> tp->segs_in and tp->segs_out need to be cleared in tcp_disconnect().
>
> tcp_disconnect() is rarely used, but it is worth fixing it.
>
> Fixes: 2efd055c53c0 ("tcp: add tcpi_segs_in and tcpi_segs_out to tcp_info")
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Cc: Marcelo Ricardo Leitner <mleitner@...hat.com>
> Cc: Yuchung Cheng <ycheng@...gle.com>
> Cc: Neal Cardwell <ncardwell@...gle.com>
> ---
>  net/ipv4/tcp.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
> index 3b601823f69a93dd20f9a4876945a87cd2196dc9..eb2d80519f8e5ad165ca3b8acef2b10bdf8b7345 100644
> --- a/net/ipv4/tcp.c
> +++ b/net/ipv4/tcp.c
> @@ -2639,6 +2639,8 @@ int tcp_disconnect(struct sock *sk, int flags)
>         sk->sk_rx_dst = NULL;
>         tcp_saved_syn_free(tp);
>         tp->compressed_ack = 0;
> +       tp->segs_in = 0;
> +       tp->segs_out = 0;
>         tp->bytes_sent = 0;
>         tp->bytes_acked = 0;
>         tp->bytes_received = 0;
> --

Thanks, Eric!

Acked-by: Neal Cardwell <ncardwell@...gle.com>

neal

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ