9p: Unknown Cache mode fsSache serio: Serial port tty28 cgroup: Unknown subsys name 'perf_event' cgroup: Unknown subsys name 'net_cls' ================================================================== BUG: KASAN: use-after-free in perf_trace_lock_acquire+0x3f7/0x590 include/trace/events/lock.h:13 Read of size 8 at addr ffff88804cebf938 by task syz-executor.5/8240 CPU: 1 PID: 8240 Comm: syz-executor.5 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:00007f48fac00188 EFLAGS: 00000246 ORIG_RAX: 000000000000009b RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 0000000000466609 RDX: 0000000000000000 RSI: 0000000020000040 RDI: 0000000020000000 RBP: 00000000004bfcb9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007ffd3bcd8f3f R14: 00007f48fac00300 R15: 0000000000022000 Allocated by task 1743: 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 kernel_thread+0xb5/0xf0 kernel/fork.c:2517 call_usermodehelper_exec_sync kernel/umh.c:133 [inline] call_usermodehelper_exec_work+0x69/0x180 kernel/umh.c:164 process_one_work+0x9a9/0x1590 kernel/workqueue.c:2270 worker_thread+0x61d/0x1310 kernel/workqueue.c:2416 kthread+0x38f/0x470 kernel/kthread.c:292 ret_from_fork+0x22/0x30 arch/x86/entry/entry_64.S:296 Freed by task 8233: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track+0x1c/0x30 mm/kasan/common.c:56 kasan_set_free_info+0x1b/0x30 mm/kasan/generic.c:355 __kasan_slab_free+0x110/0x150 mm/kasan/common.c:422 slab_free_hook mm/slub.c:1542 [inline] slab_free_freelist_hook+0x64/0x150 mm/slub.c:1575 slab_free mm/slub.c:3140 [inline] kmem_cache_free+0x97/0x2f0 mm/slub.c:3156 free_fs_struct fs/fs_struct.c:92 [inline] exit_fs+0x123/0x170 fs/fs_struct.c:108 do_exit+0xbe9/0x2770 kernel/exit.c:807 do_group_exit+0x125/0x310 kernel/exit.c:908 __do_sys_exit_group kernel/exit.c:919 [inline] __se_sys_exit_group kernel/exit.c:917 [inline] __x64_sys_exit_group+0x3a/0x50 kernel/exit.c:917 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 ffff88804cebf900 which belongs to the cache fs_cache of size 168 The buggy address is located 56 bytes inside of 168-byte region [ffff88804cebf900, ffff88804cebf9a8) The buggy address belongs to the page: page:00000000c873574e refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x4cebf flags: 0x100000000000200(slab) raw: 0100000000000200 ffffea00003195c0 0000000d0000000d ffff888007fdc640 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88804cebf800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804cebf880: fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc >ffff88804cebf900: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88804cebf980: fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc ffff88804cebfa00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================