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]
Date:   Fri, 6 Sep 2019 12:33:02 +0200
From:   Eric Dumazet <edumazet@...gle.com>
To:     chunguo feng <chunguo.feng@...ogic.com>,
        Yuchung Cheng <ycheng@...gle.com>,
        Neal Cardwell <ncardwell@...gle.com>
Cc:     David Miller <davem@...emloft.net>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        netdev <netdev@...r.kernel.org>, Yonghong Song <yhs@...com>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] tcp: fix tcp_disconnect() not clear tp->fastopen_rsk sometimes

On Fri, Sep 6, 2019 at 11:34 AM chunguo feng <chunguo.feng@...ogic.com> wrote:
>
> From: fengchunguo <chunguo.feng@...ogic.com>
>
> This patch avoids fastopen_rsk not be cleared every times, then occur
> the below BUG_ON:
> tcp_v4_destroy_sock
>         ->BUG_ON(tp->fastopen_rsk);
>
> When playback some videos from netwrok,used tcp_disconnect continually.

Wow, tcp_disconnect() being used by something else than syzkaller !

>         kthread+0x114/0x140
>         ret_from_fork+0x10/0x18
>
> Signed-off-by: fengchunguo <chunguo.feng@...ogic.com>
> ---
>  net/ipv4/tcp.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
> index 61082065b26a..f5c354c0b24c 100644
> --- a/net/ipv4/tcp.c
> +++ b/net/ipv4/tcp.c
> @@ -2655,6 +2655,7 @@ int tcp_disconnect(struct sock *sk, int flags)
>         /* Clean up fastopen related fields */
>         tcp_free_fastopen_req(tp);
>         inet->defer_connect = 0;
> +       tp->fastopen_rsk = 0;
>
>         WARN_ON(inet->inet_num && !icsk->icsk_bind_hash);
>

This seems suspicious to me.

Are we leaking a block of memory after your patch ?

If the block of memory has been freed, maybe clear the pointer at the
place the free happened ?

I am traveling to Lisbon for LPC, maybe Yuchung or Neal can take a look.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ