loop6: detected capacity change from 0 to 3 EXT4-fs (loop6): unable to read superblock ------------[ cut here ]------------ kernfs_put: syz5/memory.events.local: released with incorrect active_ref 0 WARNING: CPU: 1 PID: 48 at fs/kernfs/dir.c:531 kernfs_put.part.0+0x433/0x540 Modules linked in: CPU: 1 PID: 48 Comm: kworker/1:2 Not tainted 5.19.0-rc4-next-20220701 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 ------------[ cut here ]------------ Workqueue: events kernfs_notify_workfn WARNING: CPU: 0 PID: 126 at fs/kernfs/dir.c:504 kernfs_get.part.0+0x69/0x80 Modules linked in: CPU: 0 PID: 126 Comm: systemd-udevd Not tainted 5.19.0-rc4-next-20220701 #1 RIP: 0010:kernfs_put.part.0+0x433/0x540 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 Code: 03 80 3c 18 00 0f 85 ea 00 00 00 4d 8b 7d 38 e8 53 42 a7 ff 48 8b 14 24 44 89 f1 4c 89 fe 48 c7 c7 a0 58 72 84 e8 97 1c 6c 02 <0f> 0b e9 b9 fc ff ff 48 89 ef e8 8e b6 d9 ff e9 c1 fd ff ff e8 84 RIP: 0010:kernfs_get.part.0+0x69/0x80 RSP: 0018:ffff88800f3efbd8 EFLAGS: 00010286 Code: 31 ff 89 ee e8 a8 43 a7 ff 85 ed 74 18 e8 cf 46 a7 ff be 04 00 00 00 48 89 df e8 52 be d9 ff f0 ff 03 5b 5d c3 e8 b7 46 a7 ff <0f> 0b eb df 48 89 df e8 fb ba d9 ff eb c6 66 0f 1f 84 00 00 00 00 RSP: 0018:ffff88806ce09c80 EFLAGS: 00010046 RAX: 0000000000000000 RBX: ffff88804110c3a0 RCX: 0000000000000100 RAX: 0000000000000000 RBX: dffffc0000000000 RCX: 0000000000000000 RDX: ffff888016f3d040 RSI: ffffffff819d2579 RDI: 0000000000000005 RDX: ffff88800f3e0000 RSI: ffffffff812b6848 RDI: ffffed1001e7df6d RBP: 0000000000000000 R08: 0000000000000005 R09: 0000000000000000 RBP: ffff88804110c3d8 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000001 R13: 1ffffffff0a01e40 R14: ffff88804110c3a0 R15: ffff88804420c4f0 R10: 0000000080000000 R11: 0000000000000001 R12: ffff88804110c3a0 FS: 00007fd43c7f08c0(0000) GS:ffff88806ce00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 R13: ffff88804389de80 R14: 0000000000000000 R15: ffff88800b774c08 CR2: 00007fdff95bf310 CR3: 000000000f0e4000 CR4: 0000000000350ef0 Call Trace: FS: 0000000000000000(0000) GS:ffff88806cf00000(0000) knlGS:0000000000000000 kernfs_get+0x1b/0x30 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 kernfs_notify+0x180/0x350 CR2: 0000001b2da22000 CR3: 000000001ad22000 CR4: 0000000000350ee0 cgroup_file_notify+0xf5/0x1a0 Call Trace: call_timer_fn+0x17d/0x5f0 kernfs_put+0x42/0x50 kernfs_notify_workfn+0x417/0x560 __run_timers.part.0+0x65e/0xa50 run_timer_softirq+0xae/0x1a0 __do_softirq+0x1c8/0x8cc __irq_exit_rcu+0x113/0x170 irq_exit_rcu+0x5/0x20 sysvec_apic_timer_interrupt+0x8e/0xc0 asm_sysvec_apic_timer_interrupt+0x1b/0x20 RIP: 0010:lock_acquire+0x1db/0x530 Code: 02 b8 ff ff ff ff 65 0f c1 05 f9 6a d9 7e 83 f8 01 0f 85 c4 02 00 00 48 83 7c 24 08 00 74 01 fb 48 b8 00 00 00 00 00 fc ff df <48> 01 c3 48 c7 03 00 00 00 00 48 c7 43 08 00 00 00 00 48 8b 84 24 RSP: 0018:ffff888017c97220 EFLAGS: 00000206 RAX: dffffc0000000000 RBX: 1ffff11002f92e46 RCX: 00000000fd67c7f2 RDX: 1ffff11002de7b36 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: ffffffff86a5c7c7 R10: fffffbfff0d4b8f8 R11: 0000000000000001 R12: 0000000000000002 R13: 0000000000000000 R14: ffffffff852049a0 R15: 0000000000000000 __is_insn_slot_addr+0x3d/0x250 kernel_text_address+0x40/0xb0 __kernel_text_address+0x9/0x30 unwind_get_return_address+0x51/0x90 arch_stack_walk+0x99/0xf0 stack_trace_save+0x8c/0xc0 kasan_save_stack+0x1e/0x40 process_one_work+0xa0f/0x1690 worker_thread+0x637/0x1250 kthread+0x2ed/0x3a0 ret_from_fork+0x22/0x30 irq event stamp: 516003 hardirqs last enabled at (516015): [] asm_sysvec_apic_timer_interrupt+0x1b/0x20 hardirqs last disabled at (516024): [] console_emit_next_record.constprop.0+0x667/0x800 __kasan_slab_alloc+0x66/0x80 softirqs last enabled at (515908): [] __irq_exit_rcu+0x113/0x170 kmem_cache_alloc+0x1b1/0x490 vm_area_dup+0x7f/0x220 softirqs last disabled at (515871): [] __irq_exit_rcu+0x113/0x170 ---[ end trace 0000000000000000 ]--- dup_mmap+0x5a1/0xf40 dup_mm+0x91/0x370 copy_process+0x6941/0x6d60 kernel_clone+0xe7/0xa60 __do_sys_clone+0xba/0x100 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x46/0xb0 ================================================================== RIP: 0033:0x7fd43cc7c4bb BUG: KASAN: use-after-free in llist_del_first+0x89/0xa0 Code: ed 0f 85 f8 00 00 00 64 4c 8b 0c 25 10 00 00 00 45 31 c0 4d 8d 91 d0 02 00 00 31 d2 31 f6 bf 11 00 20 01 b8 38 00 00 00 0f 05 <48> 3d 00 f0 ff ff 0f 87 91 00 00 00 41 89 c5 85 c0 0f 85 9e 00 00 Read of size 8 at addr ffff88804110c420 by task kworker/1:2/48 RSP: 002b:00007ffe04cf3d10 EFLAGS: 00000246 CPU: 1 PID: 48 Comm: kworker/1:2 Tainted: G W 5.19.0-rc4-next-20220701 #1 ORIG_RAX: 0000000000000038 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007fd43cc7c4bb Workqueue: events kernfs_notify_workfn RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011 RBP: 0000000000000000 R08: 0000000000000000 R09: 00007fd43c7f08c0 Call Trace: R10: 00007fd43c7f0b90 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe04cf3de0 R14: 0000000000000000 R15: 0000000000000000 dump_stack_lvl+0x8b/0xb3 print_report.cold+0x5e/0x5e1 irq event stamp: 1206471 hardirqs last enabled at (1206470): [] _raw_spin_unlock_irq+0x1f/0x40 kasan_report+0xb1/0x1b0 hardirqs last disabled at (1206471): [] _raw_spin_lock_irqsave+0x4e/0x50 softirqs last enabled at (1205016): [] __irq_exit_rcu+0x113/0x170 llist_del_first+0x89/0xa0 softirqs last disabled at (1206463): [] __irq_exit_rcu+0x113/0x170 kernfs_notify_workfn+0x78/0x560 ---[ end trace 0000000000000000 ]--- process_one_work+0xa0f/0x1690 worker_thread+0x637/0x1250 kthread+0x2ed/0x3a0 ret_from_fork+0x22/0x30 Allocated by task 292: kasan_save_stack+0x1e/0x40 __kasan_slab_alloc+0x66/0x80 kmem_cache_alloc+0x1b1/0x490 __kernfs_new_node+0xd4/0x8b0 kernfs_new_node+0x93/0x120 __kernfs_create_file+0x51/0x350 cgroup_addrm_files+0x3e2/0x9d0 css_populate_dir+0x19b/0x450 cgroup_apply_control_enable+0x3ae/0xa40 cgroup_mkdir+0x824/0x11f0 kernfs_iop_mkdir+0x149/0x1d0 vfs_mkdir+0x417/0x6a0 do_mkdirat+0x17b/0x2e0 __x64_sys_mkdir+0xf2/0x140 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x46/0xb0 Freed by task 48: kasan_save_stack+0x1e/0x40 kasan_set_track+0x21/0x30 kasan_set_free_info+0x20/0x30 __kasan_slab_free+0x108/0x190 kmem_cache_free+0xfb/0x600 kernfs_put.part.0+0x2c7/0x540 kernfs_put+0x42/0x50 kernfs_notify_workfn+0x417/0x560 process_one_work+0xa0f/0x1690 worker_thread+0x637/0x1250 kthread+0x2ed/0x3a0 ret_from_fork+0x22/0x30 The buggy address belongs to the object at ffff88804110c3a0 which belongs to the cache kernfs_node_cache of size 168 The buggy address is located 128 bytes inside of 168-byte region [ffff88804110c3a0, ffff88804110c448) The buggy address belongs to the physical page: page:00000000b533a620 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x4110c flags: 0x100000000000200(slab|node=0|zone=1) raw: 0100000000000200 0000000000000000 dead000000000122 ffff8880080718c0 raw: 0000000000000000 0000000000110011 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88804110c300: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ffff88804110c380: fc fc fc fc fa fb fb fb fb fb fb fb fb fb fb fb >ffff88804110c400: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc ^ ffff88804110c480: fc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88804110c500: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc 00 00 ================================================================== loop0: detected capacity change from 0 to 256 FAT-fs (loop0): Invalid FSINFO signature: 0x00000000, 0x00000000 (sector = 1) ata2.00: qc timeout (cmd 0xa0) ata2: found unknown device (class 0) ---------------- Code disassembly (best guess): 0: 02 b8 ff ff ff ff add -0x1(%rax),%bh 6: 65 0f c1 05 f9 6a d9 xadd %eax,%gs:0x7ed96af9(%rip) # 0x7ed96b07 d: 7e e: 83 f8 01 cmp $0x1,%eax 11: 0f 85 c4 02 00 00 jne 0x2db 17: 48 83 7c 24 08 00 cmpq $0x0,0x8(%rsp) 1d: 74 01 je 0x20 1f: fb sti 20: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 27: fc ff df * 2a: 48 01 c3 add %rax,%rbx <-- trapping instruction 2d: 48 c7 03 00 00 00 00 movq $0x0,(%rbx) 34: 48 c7 43 08 00 00 00 movq $0x0,0x8(%rbx) 3b: 00 3c: 48 rex.W 3d: 8b .byte 0x8b 3e: 84 .byte 0x84 3f: 24 .byte 0x24