[syzbot] BUG: sleeping function called from invalid context in corrupted (2)

14 views
Skip to first unread message

syzbot

unread,
Jun 9, 2022, 12:01:25 AM6/9/22
to and...@kernel.org, a...@kernel.org, b...@vger.kernel.org, dan...@iogearbox.net, da...@davemloft.net, edum...@google.com, ja...@cloudflare.com, john.fa...@gmail.com, ka...@fb.com, kps...@kernel.org, ku...@kernel.org, linux-...@vger.kernel.org, net...@vger.kernel.org, pab...@redhat.com, songliu...@fb.com, syzkall...@googlegroups.com, wang...@huawei.com, y...@fb.com
Hello,

syzbot found the following issue on:

HEAD commit: 03c312cc5f47 Add linux-next specific files for 20220608
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=155a4b73f00000
kernel config: https://syzkaller.appspot.com/x/.config?x=a0a0f5184fb46b
dashboard link: https://syzkaller.appspot.com/bug?extid=efe1afd49d981d281ae4
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=168d9ebff00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=125c6e5ff00000

The issue was bisected to:

commit d8616ee2affcff37c5d315310da557a694a3303d
Author: Wang Yufen <wang...@huawei.com>
Date: Tue May 24 07:53:11 2022 +0000

bpf, sockmap: Fix sk->sk_forward_alloc warn_on in sk_stream_kill_queues

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=138a4b57f00000
final oops: https://syzkaller.appspot.com/x/report.txt?x=104a4b57f00000
console output: https://syzkaller.appspot.com/x/log.txt?x=178a4b57f00000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+efe1af...@syzkaller.appspotmail.com
Fixes: d8616ee2affc ("bpf, sockmap: Fix sk->sk_forward_alloc warn_on in sk_stream_kill_queues")

BUG: sleeping function called from invalid context at kernel/workqueue.c:3010
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 3611, name: syz-executor124
preempt_count: 201, expected: 0
RCU nest depth: 0, expected: 0
3 locks held by syz-executor124/3611:
#0: ffff888073295c10 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:742 [inline]
#0: ffff888073295c10 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: __sock_release+0x86/0x280 net/socket.c:649
#1: ffff888073ff1ab0 (sk_lock-AF_INET6){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1691 [inline]
#1: ffff888073ff1ab0 (sk_lock-AF_INET6){+.+.}-{0:0}, at: tcp_close+0x1e/0xc0 net/ipv4/tcp.c:2908


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
For information about bisection process see: https://goo.gl/tpsmEJ#bisection
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches

Daniel Borkmann

unread,
Jun 9, 2022, 6:27:11 AM6/9/22
to syzbot, and...@kernel.org, a...@kernel.org, b...@vger.kernel.org, da...@davemloft.net, edum...@google.com, ja...@cloudflare.com, john.fa...@gmail.com, ka...@fb.com, kps...@kernel.org, ku...@kernel.org, linux-...@vger.kernel.org, net...@vger.kernel.org, pab...@redhat.com, songliu...@fb.com, syzkall...@googlegroups.com, wang...@huawei.com, y...@fb.com
On 6/9/22 6:01 AM, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 03c312cc5f47 Add linux-next specific files for 20220608
> git tree: linux-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=155a4b73f00000
> kernel config: https://syzkaller.appspot.com/x/.config?x=a0a0f5184fb46b
> dashboard link: https://syzkaller.appspot.com/bug?extid=efe1afd49d981d281ae4
> 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=168d9ebff00000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=125c6e5ff00000
>
> The issue was bisected to:
>
> commit d8616ee2affcff37c5d315310da557a694a3303d
> Author: Wang Yufen <wang...@huawei.com>
> Date: Tue May 24 07:53:11 2022 +0000
>
> bpf, sockmap: Fix sk->sk_forward_alloc warn_on in sk_stream_kill_queues

Wang, please take a look and fix. Thanks!

Hillf Danton

unread,
Jun 10, 2022, 10:53:02 PM6/10/22
to syzbot, linux-...@vger.kernel.org, syzkall...@googlegroups.com
On Wed, 08 Jun 2022 21:01:24 -0700
See if it is due to cancel_work_sync() in sk_psock_stop().

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 03c312cc5f47

--- y/net/core/sock_map.c
+++ x/net/core/sock_map.c
@@ -1578,7 +1578,7 @@ void sock_map_destroy(struct sock *sk)
saved_destroy = psock->saved_destroy;
sock_map_remove_links(sk, psock);
rcu_read_unlock();
- sk_psock_stop(psock, true);
+ sk_psock_stop(psock, false);
sk_psock_put(sk, psock);
saved_destroy(sk);
}
--

syzbot

unread,
Jun 10, 2022, 11:11:18 PM6/10/22
to hda...@sina.com, linux-...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-and-tested-by: syzbot+efe1af...@syzkaller.appspotmail.com

Tested on:

commit: 03c312cc Add linux-next specific files for 20220608
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
console output: https://syzkaller.appspot.com/x/log.txt?x=16e6c28bf00000
kernel config: https://syzkaller.appspot.com/x/.config?x=a0a0f5184fb46b
dashboard link: https://syzkaller.appspot.com/bug?extid=efe1afd49d981d281ae4
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
patch: https://syzkaller.appspot.com/x/patch.diff?x=11367c2ff00000

Note: testing is done by a robot and is best-effort only.

syzbot

unread,
Apr 21, 2023, 4:05:45 PM4/21/23
to syzkall...@googlegroups.com
Auto-closing this bug as obsolete.
No recent activity, existing reproducers are no longer triggering the issue.
Reply all
Reply to author
Forward
0 new messages