syzbot


possible deadlock in br_multicast_rcv (3)

Status: upstream: reported C repro on 2023/01/16 16:40
Subsystems: bridge
[Documentation on labels]
Reported-by: syzbot+d7b7f1412c02134efa6d@syzkaller.appspotmail.com
First crash: 525d, last: 29d
Cause bisection: introduced by (bisect log) :
commit 0ae3eb7b4611207e140e9772398b9f88b72d6839
Author: Amit Cohen <amcohen@nvidia.com>
Date: Mon Feb 1 19:47:49 2021 +0000

  netdevsim: fib: Perform the route programming in a non-atomic context

Crash: unregister_netdevice: waiting for DEV to become free (log)
Repro: C syz .config
  
Fix bisection: failed (error log)
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] possible deadlock in br_multicast_rcv (3) 0 (2) 2023/10/02 13:08
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 possible deadlock in br_multicast_rcv 1 304d 304d 0/3 auto-obsoleted due to no activity on 2023/11/03 02:43
linux-4.14 possible deadlock in br_multicast_rcv C 1 460d 490d 0/1 upstream: reported C repro on 2023/01/21 00:08
linux-4.19 possible deadlock in br_multicast_rcv C error 1 487d 487d 0/1 upstream: reported C repro on 2023/01/24 01:03
upstream possible deadlock in br_multicast_rcv (2) bridge 11 859d 988d 0/26 auto-closed as invalid on 2022/05/17 09:29
upstream possible deadlock in br_multicast_rcv bridge 2 1096d 1097d 0/26 auto-closed as invalid on 2021/09/03 11:13
Last patch testing requests (10)
Created Duration User Patch Repo Result
2024/04/22 07:40 1h58m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci report log
2024/01/26 12:02 22m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci report log
2023/11/14 06:38 1h11m retest repro net-next OK log
2023/11/14 05:16 22m retest repro upstream OK log
2023/11/14 05:16 27m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci report log
2023/09/05 04:34 21m retest repro linux-next OK log
2023/09/05 04:34 19m retest repro net-next error OK
2023/09/05 04:34 19m retest repro upstream report log
2023/09/05 04:34 17m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci report log
2023/01/17 00:05 19m hdanton@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git 60d86034b14e report log
Fix bisection attempts (6)
Created Duration User Patch Repo Result
2023/10/07 03:28 0m bisect fix net-next-old error OK
2023/07/17 02:23 1h46m bisect fix net-next-old job log (0) log
2023/06/16 10:26 25m bisect fix net-next-old job log (0) log
2023/04/21 08:22 52m bisect fix upstream job log (0) log
2023/03/13 02:06 26m bisect fix net-next-old job log (0) log
2023/02/11 01:22 44m bisect fix net-next-old job log (0) log
Cause bisection attempts (3)
Created Duration User Patch Repo Result
2023/10/02 01:40 11h27m bisect upstream job log (1) log
2023/09/24 11:34 0m bisect net-next-old error OK
2023/01/15 09:10 6h13m bisect net-next-old job log (1) log
marked invalid by nogikh@google.com

Sample crash report:
============================================
WARNING: possible recursive locking detected
6.2.0-rc3-syzkaller-16369-g358a161a6a9e #0 Not tainted
--------------------------------------------
dhcpcd-run-hook/4558 is trying to acquire lock:
ffff0000c4525338 (&br->multicast_lock){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:350 [inline]
ffff0000c4525338 (&br->multicast_lock){+.-.}-{2:2}, at: br_ip6_multicast_query net/bridge/br_multicast.c:3351 [inline]
ffff0000c4525338 (&br->multicast_lock){+.-.}-{2:2}, at: br_multicast_ipv6_rcv net/bridge/br_multicast.c:3747 [inline]
ffff0000c4525338 (&br->multicast_lock){+.-.}-{2:2}, at: br_multicast_rcv+0x5f4/0x2c38 net/bridge/br_multicast.c:3802

but task is already holding lock:
ffff0000c4527338 (&br->multicast_lock){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:350 [inline]
ffff0000c4527338 (&br->multicast_lock){+.-.}-{2:2}, at: br_multicast_port_query_expired net/bridge/br_multicast.c:1752 [inline]
ffff0000c4527338 (&br->multicast_lock){+.-.}-{2:2}, at: br_ip6_multicast_port_query_expired+0x38/0x160 net/bridge/br_multicast.c:1780

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(&br->multicast_lock);
  lock(&br->multicast_lock);

 *** DEADLOCK ***

 May be due to missing lock nesting notation

6 locks held by dhcpcd-run-hook/4558:
 #0: ffff0000c0e74b88 (&mm->mmap_lock){++++}-{3:3}, at: mmap_write_lock_killable include/linux/mmap_lock.h:87 [inline]
 #0: ffff0000c0e74b88 (&mm->mmap_lock){++++}-{3:3}, at: vm_mmap_pgoff+0xa0/0x1d0 mm/util.c:518
 #1: ffff800008003e20 ((&pmctx->ip6_own_query.timer)){+.-.}-{0:0}, at: lockdep_copy_map include/linux/lockdep.h:31 [inline]
 #1: ffff800008003e20 ((&pmctx->ip6_own_query.timer)){+.-.}-{0:0}, at: call_timer_fn+0x54/0x144 kernel/time/timer.c:1690
 #2: ffff0000c4527338 (&br->multicast_lock){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:350 [inline]
 #2: ffff0000c4527338 (&br->multicast_lock){+.-.}-{2:2}, at: br_multicast_port_query_expired net/bridge/br_multicast.c:1752 [inline]
 #2: ffff0000c4527338 (&br->multicast_lock){+.-.}-{2:2}, at: br_ip6_multicast_port_query_expired+0x38/0x160 net/bridge/br_multicast.c:1780
 #3: ffff80000d645548 (rcu_read_lock_bh){....}-{1:2}, at: rcu_lock_acquire+0x18/0x54 include/linux/rcupdate.h:324
 #4: ffff80000d645548 (rcu_read_lock_bh){....}-{1:2}, at: rcu_lock_acquire+0x18/0x54 include/linux/rcupdate.h:324
 #5: ffff80000d645520 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x10/0x4c include/linux/rcupdate.h:324

stack backtrace:
CPU: 0 PID: 4558 Comm: dhcpcd-run-hook Not tainted 6.2.0-rc3-syzkaller-16369-g358a161a6a9e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call trace:
 dump_backtrace+0x1c4/0x1f0 arch/arm64/kernel/stacktrace.c:156
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:163
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x104/0x16c lib/dump_stack.c:106
 dump_stack+0x1c/0x58 lib/dump_stack.c:113
 __lock_acquire+0x808/0x3084
 lock_acquire+0x100/0x1f8 kernel/locking/lockdep.c:5668
 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
 _raw_spin_lock+0x54/0x6c kernel/locking/spinlock.c:154
 spin_lock include/linux/spinlock.h:350 [inline]
 br_ip6_multicast_query net/bridge/br_multicast.c:3351 [inline]
 br_multicast_ipv6_rcv net/bridge/br_multicast.c:3747 [inline]
 br_multicast_rcv+0x5f4/0x2c38 net/bridge/br_multicast.c:3802
 br_dev_xmit+0x4ac/0x924 net/bridge/br_device.c:89
 __netdev_start_xmit include/linux/netdevice.h:4865 [inline]
 netdev_start_xmit include/linux/netdevice.h:4879 [inline]
 xmit_one net/core/dev.c:3583 [inline]
 dev_hard_start_xmit+0xd4/0x1ec net/core/dev.c:3599
 __dev_queue_xmit+0x83c/0xdb8 net/core/dev.c:4249
 dev_queue_xmit include/linux/netdevice.h:3035 [inline]
 vlan_dev_hard_start_xmit+0x110/0x260 net/8021q/vlan_dev.c:124
 __netdev_start_xmit include/linux/netdevice.h:4865 [inline]
 netdev_start_xmit include/linux/netdevice.h:4879 [inline]
 xmit_one net/core/dev.c:3583 [inline]
 dev_hard_start_xmit+0xd4/0x1ec net/core/dev.c:3599
 __dev_queue_xmit+0x83c/0xdb8 net/core/dev.c:4249
 dev_queue_xmit include/linux/netdevice.h:3035 [inline]
 br_dev_queue_push_xmit+0x318/0x388 net/bridge/br_forward.c:53
 NF_HOOK include/linux/netfilter.h:302 [inline]
 __br_multicast_send_query+0xf60/0x11d0 net/bridge/br_multicast.c:1656
 br_multicast_send_query+0x254/0x298 net/bridge/br_multicast.c:1735
 br_multicast_port_query_expired net/bridge/br_multicast.c:1760 [inline]
 br_ip6_multicast_port_query_expired+0x140/0x160 net/bridge/br_multicast.c:1780
 call_timer_fn+0x90/0x144 kernel/time/timer.c:1700
 expire_timers kernel/time/timer.c:1751 [inline]
 __run_timers+0x284/0x384 kernel/time/timer.c:2022
 run_timer_softirq+0x34/0x5c kernel/time/timer.c:2035
 _stext+0x168/0x37c
 ____do_softirq+0x14/0x20 arch/arm64/kernel/irq.c:80
 call_on_irq_stack+0x2c/0x54 arch/arm64/kernel/entry.S:892
 do_softirq_own_stack+0x20/0x2c arch/arm64/kernel/irq.c:85
 invoke_softirq+0x70/0xbc kernel/softirq.c:452
 __irq_exit_rcu+0xf0/0x140 kernel/softirq.c:650
 irq_exit_rcu+0x10/0x40 kernel/softirq.c:662
 __el1_irq arch/arm64/kernel/entry-common.c:472 [inline]
 el1_interrupt+0x38/0x68 arch/arm64/kernel/entry-common.c:486
 el1h_64_irq_handler+0x18/0x24 arch/arm64/kernel/entry-common.c:491
 el1h_64_irq+0x64/0x68 arch/arm64/kernel/entry.S:580
 arch_local_irq_restore arch/arm64/include/asm/irqflags.h:122 [inline]
 put_cpu_partial+0x164/0x1b4 mm/slub.c:2710
 __slab_free+0x184/0x250 mm/slub.c:3653
 do_slab_free mm/slub.c:3731 [inline]
 slab_free mm/slub.c:3788 [inline]
 kmem_cache_free+0x2a8/0x3a4 mm/slub.c:3809
 vm_area_free+0x38/0xe8 kernel/fork.c:485
 remove_vma mm/mmap.c:144 [inline]
 remove_mt mm/mmap.c:2163 [inline]
 do_mas_align_munmap+0x710/0x894 mm/mmap.c:2443
 do_mas_munmap mm/mmap.c:2498 [inline]
 mmap_region+0x434/0x1064 mm/mmap.c:2546
 do_mmap+0x6e0/0xa28 mm/mmap.c:1411
 vm_mmap_pgoff+0xe8/0x1d0 mm/util.c:520
 ksys_mmap_pgoff+0xa0/0x278 mm/mmap.c:1457
 __do_sys_mmap arch/arm64/kernel/sys.c:28 [inline]
 __se_sys_mmap arch/arm64/kernel/sys.c:21 [inline]
 __arm64_sys_mmap+0x58/0x6c arch/arm64/kernel/sys.c:21
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall arch/arm64/kernel/syscall.c:52 [inline]
 el0_svc_common+0x138/0x220 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x48/0x140 arch/arm64/kernel/syscall.c:197
 el0_svc+0x58/0x150 arch/arm64/kernel/entry-common.c:637
 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:584

Crashes (53):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/01/11 22:51 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 358a161a6a9e 96166539 .config console log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in br_multicast_rcv
2023/03/22 08:10 upstream 2faac9a98f01 8b4eb097 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in br_multicast_rcv
2023/01/12 01:21 net-next-old 60d86034b14e 96166539 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in br_multicast_rcv
2023/05/14 07:13 linux-next e922ba281a8d 2b9ba477 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in br_multicast_rcv
2024/03/29 18:57 upstream 480e035fc4c7 c52bcb23 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in br_multicast_rcv
2024/03/28 05:00 upstream 480e035fc4c7 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in br_multicast_rcv
2024/03/28 03:40 upstream 480e035fc4c7 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in br_multicast_rcv
2024/03/27 15:08 upstream 480e035fc4c7 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in br_multicast_rcv
2024/03/27 05:52 upstream 480e035fc4c7 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in br_multicast_rcv
2024/03/27 04:55 upstream 480e035fc4c7 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in br_multicast_rcv
2024/03/22 23:31 upstream 480e035fc4c7 7a239ce7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in br_multicast_rcv
2024/03/16 21:12 upstream 480e035fc4c7 d615901c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in br_multicast_rcv
2024/03/16 14:19 upstream 480e035fc4c7 d615901c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in br_multicast_rcv
2023/08/21 15:24 upstream f7757129e3de d216d8a0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in br_multicast_rcv
2022/12/17 00:59 upstream 77856d911a8c 05494336 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in br_multicast_rcv
2023/01/08 15:56 upstream e9ffbf16caa6 1dac8c7a .config console log report info ci-qemu-upstream-386 possible deadlock in br_multicast_rcv
2023/07/31 14:06 net e739718444f7 2a0d0f29 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in br_multicast_rcv
2024/04/26 09:24 net-next 2bd87951de65 8bdc0f22 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in br_multicast_rcv
2024/03/28 16:18 net-next 237bb5f7f7f5 120789fd .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in br_multicast_rcv
2024/03/27 21:36 net-next 237bb5f7f7f5 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in br_multicast_rcv
2024/03/27 21:36 net-next 237bb5f7f7f5 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in br_multicast_rcv
2024/03/27 20:36 net-next 237bb5f7f7f5 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in br_multicast_rcv
2024/03/27 19:02 net-next 237bb5f7f7f5 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in br_multicast_rcv
2024/03/27 18:58 net-next 237bb5f7f7f5 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in br_multicast_rcv
2024/03/27 18:46 net-next 237bb5f7f7f5 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in br_multicast_rcv
2024/03/27 17:54 net-next 237bb5f7f7f5 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in br_multicast_rcv
2024/03/27 17:13 net-next 237bb5f7f7f5 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in br_multicast_rcv
2024/03/27 17:07 net-next 237bb5f7f7f5 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in br_multicast_rcv
2024/03/27 17:07 net-next 237bb5f7f7f5 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in br_multicast_rcv
2024/03/27 17:05 net-next 237bb5f7f7f5 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in br_multicast_rcv
2024/03/27 16:26 net-next 237bb5f7f7f5 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in br_multicast_rcv
2024/03/27 16:26 net-next 237bb5f7f7f5 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in br_multicast_rcv
2024/03/27 16:11 net-next 237bb5f7f7f5 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in br_multicast_rcv
2024/03/27 15:56 net-next 237bb5f7f7f5 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in br_multicast_rcv
2024/03/27 15:40 net-next 237bb5f7f7f5 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in br_multicast_rcv
2024/03/27 15:39 net-next 237bb5f7f7f5 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in br_multicast_rcv
2024/03/27 14:30 net-next 237bb5f7f7f5 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in br_multicast_rcv
2024/03/27 14:30 net-next 237bb5f7f7f5 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in br_multicast_rcv
2024/03/27 14:26 net-next 237bb5f7f7f5 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in br_multicast_rcv
2024/03/27 14:26 net-next 237bb5f7f7f5 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in br_multicast_rcv
2024/03/27 14:22 net-next 237bb5f7f7f5 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in br_multicast_rcv
2024/03/27 12:09 net-next 237bb5f7f7f5 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in br_multicast_rcv
2024/03/27 11:46 net-next 237bb5f7f7f5 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in br_multicast_rcv
2024/03/27 11:26 net-next 237bb5f7f7f5 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in br_multicast_rcv
2024/03/27 11:24 net-next 237bb5f7f7f5 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in br_multicast_rcv
2023/07/23 04:58 net-next 6bfef2ec0172 27cbe77f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in br_multicast_rcv
* Struck through repros no longer work on HEAD.