Re: [syzbot] WARNING: suspicious RCU usage in bpf_sk_reuseport_detach

Jakub Kicinski
2022-08-15T18:58:39Z

On Mon, 15 Aug 2022 14:28:58 +0200 Daniel Borkmann wrote:
> [ +Hawkins ]
>
> On 8/15/22 12:59 PM, syzbot wrote:
> > Hello,
> >
> > syzbot found the following issue on:
> >
> > HEAD commit: 94ce3b64c62d net/tls: Use RCU API to access tls_ctx->netdev
> > git tree: net
> > console+strace: https://syzkaller.appspot.com/x/log.txt?x=14641e15080000
> > kernel config: https://syzkaller.appspot.com/x/.config?x=53da55f2bdeb0d4c
> > dashboard link: https://syzkaller.appspot.com/bug?extid=24bcff6e82ce253f23ec
> > compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
> > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=106c89fd080000
> > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17ead885080000
> >
> > The issue was bisected to:
> >
> > commit f72c38fad234759fe943cb2e40bf3d0f7de1d4d9
> > Author: Edward Cree <ecree.xilinx@gmail.com>
> > Date: Wed Jul 20 18:33:48 2022 +0000
> >
> > sfc: hook up ef100 representor TX
>
> Looks rather related to:
>
> commit 2a0133723f9ebeb751cfce19f74ec07e108bef1f
> Author: Hawkins Jiawei <yin31149@gmail.com>
> Date: Fri Aug 5 15:48:34 2022 +0800
>
> net: fix refcount bug in sk_psock_get (2)

Indeed, looks like the reuseport clearing needs to be some
approximation of rcu_dereference_protected().