syzbot


WARNING: refcount bug in nsim_fib_event_nb

Status: upstream: reported on 2024/11/20 08:27
Reported-by: syzbot+f0ce6ea39c9ca9efda42@syzkaller.appspotmail.com
First crash: 68d, last: 68d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING: refcount bug in nsim_fib_event_nb net 5 83d 123d 0/28 upstream: reported on 2024/09/26 09:06

Sample crash report:
------------[ cut here ]------------
refcount_t: addition on 0; use-after-free.
WARNING: CPU: 1 PID: 7292 at lib/refcount.c:25 refcount_warn_saturate+0x1a8/0x20c lib/refcount.c:25
Modules linked in:
CPU: 1 PID: 7292 Comm: kworker/u4:10 Not tainted 6.1.118-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Workqueue: netns cleanup_net
pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : refcount_warn_saturate+0x1a8/0x20c lib/refcount.c:25
lr : refcount_warn_saturate+0x1a8/0x20c lib/refcount.c:25
sp : ffff800020f772e0
x29: ffff800020f772e0 x28: ffff0000d275e000 x27: dfff800000000000
x26: dfff800000000000 x25: 0000000000000008 x24: ffffffffffffffff
x23: ffff0000d275e020 x22: 0000000000000000 x21: 0000000000000002
x20: ffff0000ce90c03c x19: ffff80001833d000 x18: ffff800020f766e0
x17: 0000000000000000 x16: ffff800012295cec x15: 0000000000000000
x14: 00000000ffffffff x13: 0000000000000001 x12: 0000000000000001
x11: 0000000000ff0100 x10: 0000000000000000 x9 : 25d31bbc58e63c00
x8 : 25d31bbc58e63c00 x7 : 0000000000000001 x6 : 0000000000000001
x5 : ffff800020f76bd8 x4 : ffff800015ab30e0 x3 : ffff800008585a08
x2 : 0000000000000001 x1 : 0000000100000000 x0 : 0000000000000000
Call trace:
 refcount_warn_saturate+0x1a8/0x20c lib/refcount.c:25
 __refcount_inc include/linux/refcount.h:250 [inline]
 refcount_inc include/linux/refcount.h:267 [inline]
 fib_info_hold include/net/ip_fib.h:577 [inline]
 nsim_fib4_prepare_event drivers/net/netdevsim/fib.c:930 [inline]
 nsim_fib_event_schedule_work drivers/net/netdevsim/fib.c:1000 [inline]
 nsim_fib_event_nb+0xba8/0xe28 drivers/net/netdevsim/fib.c:1043
 call_fib_notifier+0x54/0x88 net/core/fib_notifier.c:24
 call_fib4_notifier+0x60/0x80 net/ipv4/fib_notifier.c:16
 call_fib_entry_notifier net/ipv4/fib_trie.c:89 [inline]
 fib_leaf_notify net/ipv4/fib_trie.c:2203 [inline]
 fib_table_notify net/ipv4/fib_trie.c:2221 [inline]
 fib_notify+0x360/0x61c net/ipv4/fib_trie.c:2244
 fib4_dump+0x64/0x80 net/ipv4/fib_notifier.c:45
 fib_net_dump net/core/fib_notifier.c:71 [inline]
 register_fib_notifier+0x168/0x348 net/core/fib_notifier.c:109
 nsim_fib_create+0x8e0/0xa38 drivers/net/netdevsim/fib.c:1597
 nsim_dev_reload_create drivers/net/netdevsim/dev.c:1488 [inline]
 nsim_dev_reload_up+0x354/0x740 drivers/net/netdevsim/dev.c:988
 devlink_reload+0x244/0x578 net/devlink/leftover.c:4479
 devlink_pernet_pre_exit+0x138/0x318 net/devlink/leftover.c:12501
 ops_pre_exit_list net/core/net_namespace.c:162 [inline]
 cleanup_net+0x488/0x994 net/core/net_namespace.c:592
 process_one_work+0x7ac/0x1404 kernel/workqueue.c:2292
 worker_thread+0x8e4/0xfec kernel/workqueue.c:2439
 kthread+0x250/0x2d8 kernel/kthread.c:376
 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:864
irq event stamp: 6341662
hardirqs last  enabled at (6341661): [<ffff80000833eab0>] __up_console_sem+0xb4/0x100 kernel/printk/printk.c:261
hardirqs last disabled at (6341662): [<ffff8000122919a4>] el1_dbg+0x24/0x80 arch/arm64/kernel/entry-common.c:405
softirqs last  enabled at (6341636): [<ffff8000081c1c58>] softirq_handle_end kernel/softirq.c:414 [inline]
softirqs last  enabled at (6341636): [<ffff8000081c1c58>] handle_softirqs+0xb84/0xd58 kernel/softirq.c:599
softirqs last disabled at (6341581): [<ffff800008020174>] __do_softirq+0x14/0x20 kernel/softirq.c:605
---[ end trace 0000000000000000 ]---
tipc: Left network mode
device hsr_slave_0 left promiscuous mode
device hsr_slave_1 left promiscuous mode
batman_adv: batadv0: Interface deactivated: batadv_slave_0
batman_adv: batadv0: Removing interface: batadv_slave_0
batman_adv: batadv0: Interface deactivated: batadv_slave_1
batman_adv: batadv0: Removing interface: batadv_slave_1
device bridge_slave_1 left promiscuous mode
bridge0: port 2(bridge_slave_1) entered disabled state
device bridge_slave_0 left promiscuous mode
bridge0: port 1(bridge_slave_0) entered disabled state
device veth0_macvtap left promiscuous mode
device veth1_vlan left promiscuous mode
device veth0_vlan left promiscuous mode
team0 (unregistering): Port device team_slave_1 removed
team0 (unregistering): Port device team_slave_0 removed
bond0 (unregistering): (slave bond_slave_1): Releasing backup interface
bond0 (unregistering): (slave bond_slave_0): Releasing backup interface
bond0 (unregistering): Released all slaves

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/20 08:26 linux-6.1.y b67dc5c9ade9 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 WARNING: refcount bug in nsim_fib_event_nb
* Struck through repros no longer work on HEAD.