Re: possible deadlock in mptcp_push_pending

From: Paolo Abeni
Date: Thu Feb 18 2021 - 09:58:36 EST


On Wed, 2021-02-17 at 09:31 -0800, syzbot wrote:
> syzbot found the following issue on:
>
> HEAD commit: c48f8607 Merge branch 'PTP-for-DSA-tag_ocelot_8021q'
> git tree: net-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=16525cb0d00000
> kernel config: https://syzkaller.appspot.com/x/.config?x=dbc1ca9e55dc1f9f
> dashboard link: https://syzkaller.appspot.com/bug?extid=d1b1723faccb7a43f6d1
>
> Unfortunately, I don't have any reproducer for this issue yet.
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+d1b1723faccb7a43f6d1@xxxxxxxxxxxxxxxxxxxxxxxxx
>
> ============================================
> WARNING: possible recursive locking detected
> 5.11.0-rc7-syzkaller #0 Not tainted
> --------------------------------------------
> syz-executor.1/15600 is trying to acquire lock:
> ffff888057303220 (sk_lock-AF_INET6){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1598 [inline]
> ffff888057303220 (sk_lock-AF_INET6){+.+.}-{0:0}, at: mptcp_push_pending+0x28b/0x650 net/mptcp/protocol.c:1466

Even this one is suspected to be a dup of 'WARNING in dst_release': the
subflow socket lock family is reported to be 'sk_lock-AF_INET6', but
subflows are created in kernel, and get 'k-sk_lock-AF_INET6'. This
looks like [re]use after free, likely via msk->first, as in the
suspected dup issue. Lacking a repro, I'm not 110% sure.

@Dmitry, I'm wondering which is the preferred course of action here:
tentatively marking this one as a dup, or leaving it alone till we get
a reproducer?

Thanks!

Paolo