INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. CPU: 1 PID: 10922 Comm: kworker/1:11 Not tainted 5.12.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events l2cap_chan_timeout Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x141/0x1d7 lib/dump_stack.c:120 assign_lock_key kernel/locking/lockdep.c:935 [inline] register_lock_class+0x106b/0x1170 kernel/locking/lockdep.c:1247 __lock_acquire+0x106/0x54c0 kernel/locking/lockdep.c:4779 lock_acquire kernel/locking/lockdep.c:5510 [inline] lock_acquire+0x1ab/0x740 kernel/locking/lockdep.c:5475 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline] _raw_spin_lock_bh+0x2f/0x40 kernel/locking/spinlock.c:175 spin_lock_bh include/linux/spinlock.h:359 [inline] lock_sock_nested+0x40/0x120 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_chan_close+0x1bc/0xaf0 net/bluetooth/l2cap_core.c:823 l2cap_chan_timeout+0x17e/0x2f0 net/bluetooth/l2cap_core.c:436 process_one_work+0x98d/0x1600 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:294 ================================================================== BUG: KASAN: slab-out-of-bounds in l2cap_sock_teardown_cb+0x5c9/0x660 net/bluetooth/l2cap_sock.c:1522 Read of size 8 at addr ffff888023ca44c8 by task kworker/1:11/10922 CPU: 1 PID: 10922 Comm: kworker/1:11 Not tainted 5.12.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events l2cap_chan_timeout Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x141/0x1d7 lib/dump_stack.c:120 print_address_description.constprop.0.cold+0x5b/0x2f8 mm/kasan/report.c:232 __kasan_report mm/kasan/report.c:399 [inline] kasan_report.cold+0x7c/0xd8 mm/kasan/report.c:416 l2cap_sock_teardown_cb+0x5c9/0x660 net/bluetooth/l2cap_sock.c:1522 l2cap_chan_del+0xbc/0xa80 net/bluetooth/l2cap_core.c:618 l2cap_chan_close+0x1bc/0xaf0 net/bluetooth/l2cap_core.c:823 l2cap_chan_timeout+0x17e/0x2f0 net/bluetooth/l2cap_core.c:436 process_one_work+0x98d/0x1600 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:294 Allocated by task 13897: 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:427 [inline] ____kasan_kmalloc mm/kasan/common.c:506 [inline] ____kasan_kmalloc mm/kasan/common.c:465 [inline] __kasan_kmalloc+0x99/0xc0 mm/kasan/common.c:515 kmalloc include/linux/slab.h:559 [inline] kzalloc include/linux/slab.h:684 [inline] ops_init+0xfb/0x470 net/core/net_namespace.c:130 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:2998 __do_sys_unshare kernel/fork.c:3066 [inline] __se_sys_unshare kernel/fork.c:3064 [inline] __x64_sys_unshare+0x2d/0x40 kernel/fork.c:3064 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae Last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xe5/0x110 mm/kasan/generic.c:345 kvfree_call_rcu+0x10e/0x7d0 kernel/rcu/tree.c:3577 drop_sysctl_table+0x3c0/0x4e0 fs/proc/proc_sysctl.c:1652 unregister_sysctl_table fs/proc/proc_sysctl.c:1690 [inline] unregister_sysctl_table+0xc2/0x190 fs/proc/proc_sysctl.c:1665 nf_conntrack_standalone_fini_sysctl net/netfilter/nf_conntrack_standalone.c:1091 [inline] nf_conntrack_fini_net net/netfilter/nf_conntrack_standalone.c:1111 [inline] nf_conntrack_pernet_exit+0xeb/0x1b0 net/netfilter/nf_conntrack_standalone.c:1154 ops_exit_list+0x10d/0x160 net/core/net_namespace.c:178 cleanup_net+0x4ea/0xb10 net/core/net_namespace.c:595 process_one_work+0x98d/0x1600 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:294 Second to last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xe5/0x110 mm/kasan/generic.c:345 kvfree_call_rcu+0x10e/0x7d0 kernel/rcu/tree.c:3577 drop_sysctl_table+0x3c0/0x4e0 fs/proc/proc_sysctl.c:1652 unregister_sysctl_table fs/proc/proc_sysctl.c:1690 [inline] unregister_sysctl_table+0xc2/0x190 fs/proc/proc_sysctl.c:1665 __addrconf_sysctl_unregister net/ipv6/addrconf.c:6972 [inline] addrconf_sysctl_unregister+0xee/0x1c0 net/ipv6/addrconf.c:7000 addrconf_ifdown.isra.0+0xfa8/0x15b0 net/ipv6/addrconf.c:3849 addrconf_notify+0x55c/0x23e0 net/ipv6/addrconf.c:3631 notifier_call_chain+0xb5/0x200 kernel/notifier.c:83 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:2121 call_netdevice_notifiers_extack net/core/dev.c:2133 [inline] call_netdevice_notifiers net/core/dev.c:2147 [inline] unregister_netdevice_many+0x942/0x1780 net/core/dev.c:11000 ip_tunnel_delete_nets+0x3eb/0x5b0 net/ipv4/ip_tunnel.c:1113 ops_exit_list+0x10d/0x160 net/core/net_namespace.c:178 cleanup_net+0x4ea/0xb10 net/core/net_namespace.c:595 process_one_work+0x98d/0x1600 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:294 The buggy address belongs to the object at ffff888023ca4000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 1224 bytes inside of 2048-byte region [ffff888023ca4000, ffff888023ca4800) The buggy address belongs to the page: page:ffffea00008f2800 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888023ca7000 pfn:0x23ca0 head:ffffea00008f2800 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head) raw: 00fff00000010200 ffffea00018cd008 ffffea000065bc08 ffff888010842000 raw: ffff888023ca7000 0000000000080007 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888023ca4380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888023ca4400: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc >ffff888023ca4480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888023ca4500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888023ca4580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================