BUG: spinlock bad magic on CPU#1, syz-executor.5/8784 ================================================================== BUG: KASAN: slab-out-of-bounds in task_pid_nr include/linux/sched.h:1408 [inline] BUG: KASAN: slab-out-of-bounds in spin_dump kernel/locking/spinlock_debug.c:65 [inline] BUG: KASAN: slab-out-of-bounds in spin_bug.cold+0x95/0x9e kernel/locking/spinlock_debug.c:75 Read of size 4 at addr ffff8880605237c0 by task syz-executor.5/8784 CPU: 1 PID: 8784 Comm: syz-executor.5 Not tainted 5.11.0-rc7-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:120 print_address_description.constprop.0.cold+0x5b/0x2f8 mm/kasan/report.c:230 __kasan_report mm/kasan/report.c:396 [inline] kasan_report.cold+0x79/0xd5 mm/kasan/report.c:413 task_pid_nr include/linux/sched.h:1408 [inline] spin_dump kernel/locking/spinlock_debug.c:65 [inline] spin_bug.cold+0x95/0x9e kernel/locking/spinlock_debug.c:75 debug_spin_lock_before kernel/locking/spinlock_debug.c:83 [inline] do_raw_spin_lock+0x216/0x2b0 kernel/locking/spinlock_debug.c:112 spin_lock_bh include/linux/spinlock.h:359 [inline] lock_sock_nested+0x3b/0x110 net/core/sock.c:3063 l2cap_sock_teardown_cb+0xa1/0x660 net/bluetooth/l2cap_sock.c:1520 l2cap_chan_del+0xbc/0xa80 net/bluetooth/l2cap_core.c:618 l2cap_conn_del+0x3c0/0x7b0 net/bluetooth/l2cap_core.c:1896 l2cap_disconn_cfm net/bluetooth/l2cap_core.c:8168 [inline] l2cap_disconn_cfm+0x98/0xd0 net/bluetooth/l2cap_core.c:8161 hci_disconn_cfm include/net/bluetooth/hci_core.h:1486 [inline] hci_conn_hash_flush+0x127/0x260 net/bluetooth/hci_conn.c:1598 hci_dev_do_close+0x569/0x1110 net/bluetooth/hci_core.c:1778 hci_unregister_dev+0x263/0x1130 net/bluetooth/hci_core.c:3989 vhci_release+0x70/0xe0 drivers/bluetooth/hci_vhci.c:340 __fput+0x283/0x920 fs/file_table.c:280 task_work_run+0xdd/0x190 kernel/task_work.c:140 exit_task_work include/linux/task_work.h:30 [inline] do_exit+0xc5c/0x2ae0 kernel/exit.c:825 do_group_exit+0x125/0x310 kernel/exit.c:922 __do_sys_exit_group kernel/exit.c:933 [inline] __se_sys_exit_group kernel/exit.c:931 [inline] __x64_sys_exit_group+0x3a/0x50 kernel/exit.c:931 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x465b09 Code: Unable to access opcode bytes at RIP 0x465adf. RSP: 002b:00007ffe14977998 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 00007ffe14977b40 RCX: 0000000000465b09 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000043 RBP: 00000000004b0107 R08: 000000000000000c R09: 00000000ffffffff R10: 0000000000000000 R11: 0000000000000246 R12: 000000000000001c R13: 00000000000a2e7b R14: 00000000ffffffff R15: 00007ffe14977b80 Allocated by task 27373: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:401 [inline] ____kasan_kmalloc.constprop.0+0x82/0xa0 mm/kasan/common.c:429 kmalloc include/linux/slab.h:557 [inline] kzalloc include/linux/slab.h:682 [inline] __register_sysctl_table+0x112/0x1090 fs/proc/proc_sysctl.c:1314 __addrconf_sysctl_register+0x1db/0x3d0 net/ipv6/addrconf.c:6942 addrconf_sysctl_register net/ipv6/addrconf.c:6989 [inline] addrconf_sysctl_register+0x139/0x1d0 net/ipv6/addrconf.c:6978 ipv6_add_dev+0x92a/0x10e0 net/ipv6/addrconf.c:445 addrconf_notify+0x8d7/0x23e0 net/ipv6/addrconf.c:3491 notifier_call_chain+0xb5/0x200 kernel/notifier.c:83 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:2063 call_netdevice_notifiers_extack net/core/dev.c:2075 [inline] call_netdevice_notifiers net/core/dev.c:2089 [inline] register_netdevice+0x1059/0x1500 net/core/dev.c:10225 register_netdev+0x2d/0x50 net/core/dev.c:10318 ip6_tnl_init_net+0x54d/0x8b0 net/ipv6/ip6_tunnel.c:2277 ops_init+0xaf/0x470 net/core/net_namespace.c:140 setup_net+0x40f/0xa30 net/core/net_namespace.c:333 copy_net_ns+0x31e/0x760 net/core/net_namespace.c:474 create_new_namespaces+0x3f6/0xb20 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0xbd/0x1f0 kernel/nsproxy.c:226 ksys_unshare+0x445/0x8e0 kernel/fork.c:2955 __do_sys_unshare kernel/fork.c:3023 [inline] __se_sys_unshare kernel/fork.c:3021 [inline] __x64_sys_unshare+0x2d/0x40 kernel/fork.c:3021 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xc5/0xf0 mm/kasan/generic.c:344 __call_rcu kernel/rcu/tree.c:2965 [inline] call_rcu+0xbb/0x700 kernel/rcu/tree.c:3038 netlink_release+0xd43/0x1cf0 net/netlink/af_netlink.c:810 __sock_release net/socket.c:597 [inline] sock_release+0x87/0x1b0 net/socket.c:625 netlink_kernel_release+0x4b/0x60 net/netlink/af_netlink.c:2115 rdma_dev_exit_net+0x37a/0x540 drivers/infiniband/core/device.c:1137 ops_exit_list+0xb0/0x160 net/core/net_namespace.c:175 cleanup_net+0x4ea/0xb10 net/core/net_namespace.c:595 process_one_work+0x98d/0x15f0 kernel/workqueue.c:2275 worker_thread+0x64c/0x1120 kernel/workqueue.c:2421 kthread+0x3b1/0x4a0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296 Second to last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xc5/0xf0 mm/kasan/generic.c:344 __call_rcu kernel/rcu/tree.c:2965 [inline] call_rcu+0xbb/0x700 kernel/rcu/tree.c:3038 netlink_release+0xd43/0x1cf0 net/netlink/af_netlink.c:810 __sock_release net/socket.c:597 [inline] sock_release+0x87/0x1b0 net/socket.c:625 netlink_kernel_release+0x4b/0x60 net/netlink/af_netlink.c:2115 ops_exit_list+0xb0/0x160 net/core/net_namespace.c:175 cleanup_net+0x4ea/0xb10 net/core/net_namespace.c:595 process_one_work+0x98d/0x15f0 kernel/workqueue.c:2275 worker_thread+0x64c/0x1120 kernel/workqueue.c:2421 kthread+0x3b1/0x4a0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296 The buggy address belongs to the object at ffff888060523000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 1984 bytes inside of 2048-byte region [ffff888060523000, ffff888060523800) The buggy address belongs to the page: page:000000006b69f4d4 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x60520 head:000000006b69f4d4 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888010c42000 raw: 0000000000000000 0000000000080008 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888060523680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc ffff888060523700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888060523780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888060523800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888060523880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================