BUG: spinlock bad magic on CPU#0, kworker/0:10/10899 ================================================================== BUG: KASAN: slab-out-of-bounds in task_pid_nr include/linux/sched.h:1416 [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 ffff8880282f77c8 by task kworker/0:10/10899 CPU: 0 PID: 10899 Comm: kworker/0:10 Not tainted 5.12.0-rc7-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 task_pid_nr include/linux/sched.h:1416 [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+0x40/0x120 net/core/sock.c:3057 l2cap_sock_teardown_cb+0xa1/0x660 net/bluetooth/l2cap_sock.c:1528 l2cap_chan_del+0xbc/0xa80 net/bluetooth/l2cap_core.c:622 l2cap_chan_close+0x1bc/0xaf0 net/bluetooth/l2cap_core.c:825 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 8221: 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] __register_sysctl_table+0x112/0x1090 fs/proc/proc_sysctl.c:1323 __addrconf_sysctl_register+0x1db/0x3d0 net/ipv6/addrconf.c:6965 addrconf_sysctl_register net/ipv6/addrconf.c:7012 [inline] addrconf_sysctl_register+0x139/0x1d0 net/ipv6/addrconf.c:7001 ipv6_add_dev+0x965/0x1140 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:2121 call_netdevice_notifiers_extack net/core/dev.c:2133 [inline] call_netdevice_notifiers net/core/dev.c:2147 [inline] register_netdevice+0x106b/0x1500 net/core/dev.c:10293 veth_newlink+0x3ee/0xac0 drivers/net/veth.c:1516 __rtnl_newlink+0x1062/0x1710 net/core/rtnetlink.c:3452 rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3500 rtnetlink_rcv_msg+0x44e/0xad0 net/core/rtnetlink.c:5562 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2502 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1338 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1927 sock_sendmsg_nosec net/socket.c:654 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:674 __sys_sendto+0x21c/0x320 net/socket.c:1977 __do_sys_sendto net/socket.c:1989 [inline] __se_sys_sendto net/socket.c:1985 [inline] __x64_sys_sendto+0xdd/0x1b0 net/socket.c:1985 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae The buggy address belongs to the object at ffff8880282f7000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 1992 bytes inside of 2048-byte region [ffff8880282f7000, ffff8880282f7800) The buggy address belongs to the page: page:ffffea0000a0bc00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x282f0 head:ffffea0000a0bc00 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head) raw: 00fff00000010200 0000000000000000 0000000200000001 ffff888010842000 raw: 0000000000000000 0000000000080008 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880282f7680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc ffff8880282f7700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880282f7780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880282f7800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880282f7880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================