================================================================== BUG: KASAN: slab-out-of-bounds in __lock_acquire+0x108/0x5e40 kernel/locking/lockdep.c:4702 Read of size 8 at addr ffff8880763250a0 by task kworker/1:1/34 CPU: 1 PID: 34 Comm: kworker/1:1 Not tainted 5.11.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+0x183/0x22e lib/dump_stack.c:120 print_address_description+0x5f/0x3b0 mm/kasan/report.c:230 __kasan_report mm/kasan/report.c:396 [inline] kasan_report+0x15e/0x200 mm/kasan/report.c:413 __lock_acquire+0x108/0x5e40 kernel/locking/lockdep.c:4702 lock_acquire+0x174/0x6c0 kernel/locking/lockdep.c:5437 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline] _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:175 spin_lock_bh include/linux/spinlock.h:359 [inline] lock_sock_nested+0x43/0x110 net/core/sock.c:3049 l2cap_sock_teardown_cb+0x76/0x360 net/bluetooth/l2cap_sock.c:1520 l2cap_chan_del+0xaf/0x610 net/bluetooth/l2cap_core.c:618 l2cap_chan_timeout+0x12c/0x280 net/bluetooth/l2cap_core.c:436 process_one_work+0x833/0x10c0 kernel/workqueue.c:2275 worker_thread+0xaa4/0x1460 kernel/workqueue.c:2421 kthread+0x39a/0x3c0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296 Allocated by task 4890: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:401 [inline] ____kasan_kmalloc+0xbd/0xf0 mm/kasan/common.c:429 kasan_kmalloc include/linux/kasan.h:219 [inline] __kmalloc+0xaf/0x330 mm/slub.c:3970 kmalloc include/linux/slab.h:557 [inline] tomoyo_realpath_from_path+0xd8/0x610 security/tomoyo/realpath.c:254 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x201/0x650 security/tomoyo/file.c:822 security_inode_getattr+0xc0/0x140 security/security.c:1280 vfs_getattr fs/stat.c:121 [inline] vfs_statx+0x188/0x3d0 fs/stat.c:189 vfs_fstatat fs/stat.c:207 [inline] vfs_lstat include/linux/fs.h:3122 [inline] __do_sys_newlstat fs/stat.c:362 [inline] __se_sys_newlstat fs/stat.c:356 [inline] __x64_sys_newlstat+0xd3/0x150 fs/stat.c:356 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 4890: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x3d/0x70 mm/kasan/common.c:46 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:356 ____kasan_slab_free+0xe2/0x110 mm/kasan/common.c:362 kasan_slab_free include/linux/kasan.h:192 [inline] slab_free_hook mm/slub.c:1547 [inline] slab_free_freelist_hook+0xd6/0x1a0 mm/slub.c:1580 slab_free mm/slub.c:3142 [inline] kfree+0xd1/0x2a0 mm/slub.c:4124 tomoyo_realpath_from_path+0x5ce/0x610 security/tomoyo/realpath.c:291 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x201/0x650 security/tomoyo/file.c:822 security_inode_getattr+0xc0/0x140 security/security.c:1280 vfs_getattr fs/stat.c:121 [inline] vfs_statx+0x188/0x3d0 fs/stat.c:189 vfs_fstatat fs/stat.c:207 [inline] vfs_lstat include/linux/fs.h:3122 [inline] __do_sys_newlstat fs/stat.c:362 [inline] __se_sys_newlstat fs/stat.c:356 [inline] __x64_sys_newlstat+0xd3/0x150 fs/stat.c:356 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff888076324000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 160 bytes to the right of 4096-byte region [ffff888076324000, ffff888076325000) The buggy address belongs to the page: page:000000006b72c6ed refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x76320 head:000000006b72c6ed order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888010842140 raw: 0000000000000000 0000000000040004 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888076324f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888076325000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888076325080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888076325100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888076325180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================