================================================================== BUG: KASAN: slab-out-of-bounds in __lock_acquire+0x41d0/0x5640 kernel/locking/lockdep.c:4296 Read of size 8 at addr ffff888093a150a0 by task kworker/1:50/10048 CPU: 1 PID: 10048 Comm: kworker/1:50 Not tainted 5.8.0-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:77 [inline] dump_stack+0x18f/0x20d lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xae/0x436 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530 __lock_acquire+0x41d0/0x5640 kernel/locking/lockdep.c:4296 lock_acquire+0x1f1/0xad0 kernel/locking/lockdep.c:5005 __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+0x3b/0x110 net/core/sock.c:3040 l2cap_sock_teardown_cb+0x88/0x400 net/bluetooth/l2cap_sock.c:1520 l2cap_chan_del+0xad/0x1300 net/bluetooth/l2cap_core.c:618 l2cap_chan_close+0x118/0xb10 net/bluetooth/l2cap_core.c:823 l2cap_chan_timeout+0x173/0x450 net/bluetooth/l2cap_core.c:436 process_one_work+0x94c/0x1670 kernel/workqueue.c:2269 worker_thread+0x64c/0x1120 kernel/workqueue.c:2415 kthread+0x3b5/0x4a0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Allocated by task 7079: save_stack+0x1b/0x40 mm/kasan/common.c:48 set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xc2/0xd0 mm/kasan/common.c:494 __do_kmalloc mm/slab.c:3656 [inline] __kmalloc_track_caller+0x178/0x330 mm/slab.c:3671 kstrdup+0x36/0x70 mm/util.c:60 kstrdup_const+0x53/0x80 mm/util.c:82 __kernfs_new_node+0x9d/0x880 fs/kernfs/dir.c:623 kernfs_new_node+0x93/0x120 fs/kernfs/dir.c:689 __kernfs_create_file+0x51/0x350 fs/kernfs/file.c:1001 sysfs_add_file_mode_ns+0x226/0x540 fs/sysfs/file.c:305 create_files fs/sysfs/group.c:64 [inline] internal_create_group+0x328/0xb20 fs/sysfs/group.c:149 add_port drivers/infiniband/core/sysfs.c:1116 [inline] ib_setup_port_attrs+0x94e/0x12f0 drivers/infiniband/core/sysfs.c:1345 add_one_compat_dev+0x4ab/0x800 drivers/infiniband/core/device.c:918 rdma_dev_init_net+0x2dc/0x480 drivers/infiniband/core/device.c:1134 ops_init+0xaf/0x470 net/core/net_namespace.c:151 setup_net+0x2d8/0x850 net/core/net_namespace.c:341 copy_net_ns+0x2cf/0x5e0 net/core/net_namespace.c:482 create_new_namespaces+0x3f6/0xb10 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0xbd/0x1f0 kernel/nsproxy.c:231 ksys_unshare+0x445/0x8e0 kernel/fork.c:2943 __do_sys_unshare kernel/fork.c:3011 [inline] __se_sys_unshare kernel/fork.c:3009 [inline] __x64_sys_unshare+0x2d/0x40 kernel/fork.c:3009 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff888093a15080 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes to the right of 32-byte region [ffff888093a15080, ffff888093a150a0) The buggy address belongs to the page: page:ffffea00024e8540 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888093a15fc1 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea000274d2c8 ffffea0001727608 ffff8880aa0001c0 raw: ffff888093a15fc1 ffff888093a15000 000000010000003f 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888093a14f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888093a15000: 04 fc fc fc fc fc fc fc 04 fc fc fc fc fc fc fc >ffff888093a15080: 04 fc fc fc fc fc fc fc 04 fc fc fc fc fc fc fc ^ ffff888093a15100: 04 fc fc fc fc fc fc fc 04 fc fc fc fc fc fc fc ffff888093a15180: 04 fc fc fc fc fc fc fc 04 fc fc fc fc fc fc fc ==================================================================