9pnet_fd: Insufficient options for proto=fd 9pnet_fd: Insufficient options for proto=fd ================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x42c9/0x5e70 Read of size 8 at addr ffff88800e1f9818 by task syz-executor.3/4132 CPU: 1 PID: 4132 Comm: syz-executor.3 Not tainted 6.1.0-next-20221219 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 Call Trace: dump_stack_lvl+0x8f/0xb7 print_report+0x175/0x478 kasan_report+0xc0/0x100 __lock_acquire+0x42c9/0x5e70 lock_acquire.part.0+0x11e/0x340 _raw_spin_lock_irqsave+0x3d/0x60 put_pmu_ctx+0xad/0x2f0 _free_event+0x2dc/0x1210 free_event+0x58/0xc0 __do_sys_perf_event_open+0x671/0x2920 do_syscall_64+0x3f/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc RIP: 0033:0x7f9a0d3f5b19 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:00007f9a0a96b188 EFLAGS: 00000246 ORIG_RAX: 000000000000012a RAX: ffffffffffffffda RBX: 00007f9a0d508f60 RCX: 00007f9a0d3f5b19 RDX: ffffffffffffffff RSI: 0000000000000015 RDI: 0000000020000080 RBP: 00007f9a0d44ff6d R08: 0000000000000002 R09: 0000000000000000 R10: ffffffffffffffff R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd274f9d6f R14: 00007f9a0a96b300 R15: 0000000000022000 Allocated by task 4132: kasan_save_stack+0x22/0x50 kasan_set_track+0x25/0x30 __kasan_kmalloc+0x82/0x90 find_get_context+0xcc/0x800 __do_sys_perf_event_open+0x967/0x2920 do_syscall_64+0x3f/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc Freed by task 4097: kasan_save_stack+0x22/0x50 kasan_set_track+0x25/0x30 kasan_save_free_info+0x2e/0x50 __kasan_slab_free+0x10a/0x190 UDC core: USB Raw Gadget: couldn't find an available UDC or it's busy __kmem_cache_free+0xcf/0x410 misc raw-gadget: fail, usb_gadget_register_driver returned -16 rcu_core+0x7be/0x19c0 __do_softirq+0x1c7/0x8f9 Last potentially related work creation: kasan_save_stack+0x22/0x50 __kasan_record_aux_stack+0x95/0xb0 __call_rcu_common.constprop.0+0x6a/0x9f0 put_ctx+0x116/0x1e0 perf_event_exit_task+0x4d6/0x6b0 do_exit+0xabd/0x2760 do_group_exit+0xd4/0x2a0 __x64_sys_exit_group+0x3e/0x50 do_syscall_64+0x3f/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc The buggy address belongs to the object at ffff88800e1f9800 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 24 bytes inside of 512-byte region [ffff88800e1f9800, ffff88800e1f9a00) The buggy address belongs to the physical page: page:000000006d33e96d refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xe1f8 head:000000006d33e96d order:2 compound_mapcount:0 subpages_mapcount:0 compound_pincount:0 anon flags: 0x100000000010200(slab|head|node=0|zone=1) raw: 0100000000010200 ffff888008441c80 0000000000000000 dead000000000001 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88800e1f9700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88800e1f9780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88800e1f9800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88800e1f9880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88800e1f9900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== syz-executor.7: attempt to access beyond end of device loop7: rw=2049, sector=40, nr_sectors = 4 limit=40 Buffer I/O error on dev loop7, logical block 10, lost async page write loop0: detected capacity change from 0 to 264192 FAT-fs (loop0): Unrecognized mount option "" or missing value