================================================================== BUG: KASAN: slab-out-of-bounds in __lock_acquire+0x3ad2/0x5050 kernel/locking/lockdep.c:4770 Read of size 8 at addr ffff888101d5d0a0 by task kworker/1:3/2452 CPU: 1 PID: 2452 Comm: kworker/1:3 Not tainted 5.12.0-rc2-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+0x10c/0x14b lib/dump_stack.c:120 print_address_description.constprop.0.cold+0x5b/0x2c6 mm/kasan/report.c:232 __kasan_report mm/kasan/report.c:399 [inline] kasan_report.cold+0x7c/0xd8 mm/kasan/report.c:416 __lock_acquire+0x3ad2/0x5050 kernel/locking/lockdep.c:4770 lock_acquire kernel/locking/lockdep.c:5510 [inline] lock_acquire+0x212/0x850 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+0x39/0xf0 net/core/sock.c:3063 l2cap_sock_teardown_cb+0x83/0x3a0 net/bluetooth/l2cap_sock.c:1520 l2cap_chan_del+0x96/0x1010 net/bluetooth/l2cap_core.c:618 l2cap_chan_close+0xe2/0x9d0 net/bluetooth/l2cap_core.c:823 l2cap_chan_timeout+0x122/0x3a0 net/bluetooth/l2cap_core.c:436 process_one_work+0x84c/0x13b0 kernel/workqueue.c:2275 worker_thread+0x598/0xf80 kernel/workqueue.c:2421 kthread+0x36f/0x450 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Allocated by task 8538: 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+0x78/0x90 mm/kasan/common.c:515 kasan_kmalloc include/linux/kasan.h:233 [inline] __do_kmalloc mm/slab.c:3695 [inline] __kmalloc+0x22f/0x440 mm/slab.c:3704 kmalloc include/linux/slab.h:559 [inline] tomoyo_add_entry security/tomoyo/common.c:2031 [inline] tomoyo_supervisor+0xa41/0xc00 security/tomoyo/common.c:2103 tomoyo_audit_path_log security/tomoyo/file.c:168 [inline] tomoyo_path_permission security/tomoyo/file.c:587 [inline] tomoyo_path_permission+0x23d/0x330 security/tomoyo/file.c:573 tomoyo_path_perm+0x2ed/0x340 security/tomoyo/file.c:838 tomoyo_path_symlink+0x7b/0xd0 security/tomoyo/tomoyo.c:200 security_path_symlink+0xbb/0x110 security/security.c:1119 do_symlinkat+0xe5/0x260 fs/namei.c:4201 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae Freed by task 8538: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track+0x1c/0x30 mm/kasan/common.c:46 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:357 ____kasan_slab_free mm/kasan/common.c:360 [inline] ____kasan_slab_free mm/kasan/common.c:325 [inline] __kasan_slab_free+0xac/0xe0 mm/kasan/common.c:367 kasan_slab_free include/linux/kasan.h:199 [inline] __cache_free mm/slab.c:3440 [inline] kfree+0x10f/0x2d0 mm/slab.c:3796 tomoyo_add_entry security/tomoyo/common.c:2045 [inline] tomoyo_supervisor+0x992/0xc00 security/tomoyo/common.c:2103 tomoyo_audit_path_log security/tomoyo/file.c:168 [inline] tomoyo_path_permission security/tomoyo/file.c:587 [inline] tomoyo_path_permission+0x23d/0x330 security/tomoyo/file.c:573 tomoyo_path_perm+0x2ed/0x340 security/tomoyo/file.c:838 tomoyo_path_symlink+0x7b/0xd0 security/tomoyo/tomoyo.c:200 security_path_symlink+0xbb/0x110 security/security.c:1119 do_symlinkat+0xe5/0x260 fs/namei.c:4201 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 ffff888101d5d000 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 32 bytes to the right of 128-byte region [ffff888101d5d000, ffff888101d5d080) The buggy address belongs to the page: page:0000000007e86d0e refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101d5d flags: 0x17ffe0000000200(slab) raw: 017ffe0000000200 ffffea0004858748 ffffea00048a2c88 ffff888100040400 raw: 0000000000000000 ffff888101d5d000 0000000100000010 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888101d5cf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888101d5d000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888101d5d080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888101d5d100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888101d5d180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================