================================================================== BUG: KASAN: use-after-free in perf_trace_lock_acquire+0x3f7/0x590 include/trace/events/lock.h:13 Read of size 8 at addr ffff888016fa1138 by task syz-executor.3/10735 CPU: 1 PID: 10735 Comm: syz-executor.3 Not tainted 5.10.56 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:118 print_address_description.constprop.0+0x1c/0x210 mm/kasan/report.c:385 __kasan_report mm/kasan/report.c:545 [inline] kasan_report.cold+0x37/0x7c mm/kasan/report.c:562 perf_trace_lock_acquire+0x3f7/0x590 include/trace/events/lock.h:13 trace_lock_acquire include/trace/events/lock.h:13 [inline] lock_acquire+0x3d8/0x490 kernel/locking/lockdep.c:5531 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x27/0x40 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:354 [inline] chroot_fs_refs+0x11c/0x630 fs/fs_struct.c:70 __do_sys_pivot_root+0xee7/0x14b0 fs/namespace.c:3774 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x466609 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f0cf503a188 EFLAGS: 00000246 ORIG_RAX: 000000000000009b RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 0000000000466609 RDX: 0000000000000000 RSI: 0000000020000200 RDI: 00000000200001c0 RBP: 00000000004bfcb9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007ffe804279df R14: 00007f0cf503a300 R15: 0000000000022000 Allocated by task 111: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xc2/0xd0 mm/kasan/common.c:461 slab_post_alloc_hook mm/slab.h:532 [inline] slab_alloc_node mm/slub.c:2889 [inline] slab_alloc mm/slub.c:2897 [inline] kmem_cache_alloc+0x13b/0x350 mm/slub.c:2902 copy_fs_struct+0x43/0x330 fs/fs_struct.c:114 copy_fs kernel/fork.c:1449 [inline] copy_process+0x452f/0x6650 kernel/fork.c:2095 kernel_clone+0xe7/0xa20 kernel/fork.c:2465 __do_sys_clone+0xc8/0x110 kernel/fork.c:2582 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff888016fa1100 which belongs to the cache fs_cache of size 168 The buggy address is located 56 bytes inside of 168-byte region [ffff888016fa1100, ffff888016fa11a8) The buggy address belongs to the page: page:00000000aa139657 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888016fa1500 pfn:0x16fa1 flags: 0x100000000000200(slab) raw: 0100000000000200 ffffea00012182c8 ffffea0000fe7b08 ffff888007fdc640 raw: ffff888016fa1500 000000000010000d 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888016fa1000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888016fa1080: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc >ffff888016fa1100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888016fa1180: fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc ffff888016fa1200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================