loop4: detected capacity change from 0 to 1280 loop4: detected capacity change from 0 to 16383 ------------[ cut here ]------------ kernfs_put: syz0/pids.events: released with incorrect active_ref 0 WARNING: CPU: 0 PID: 10557 at fs/kernfs/dir.c:531 kernfs_put.part.0+0x433/0x540 Modules linked in: CPU: 0 PID: 10557 Comm: kworker/0:2 Not tainted 5.19.0-rc5-next-20220705 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 Workqueue: events kernfs_notify_workfn RIP: 0010:kernfs_put.part.0+0x433/0x540 Code: 03 80 3c 18 00 0f 85 ea 00 00 00 4d 8b 7d 38 e8 73 0b a7 ff 48 8b 14 24 44 89 f1 4c 89 fe 48 c7 c7 e0 58 72 84 e8 93 ac 6c 02 <0f> 0b e9 b9 fc ff ff 48 89 ef e8 0e b3 d9 ff e9 c1 fd ff ff e8 04 RSP: 0018:ffff88801ac17bd8 EFLAGS: 00010286 RAX: 0000000000000000 RBX: dffffc0000000000 RCX: 0000000000000000 RDX: ffff888045659ac0 RSI: ffffffff812bd348 RDI: ffffed1003582f6d RBP: ffff8880205b1120 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000080000000 R11: 0000000000000001 R12: ffff8880205b10e8 ------------[ cut here ]------------ R13: ffff88800e42dcb0 R14: 0000000000000000 R15: ffff88800dbb7370 FS: 0000000000000000(0000) GS:ffff88806ce00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b2e022000 CR3: 00000000181d6000 CR4: 0000000000350ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 WARNING: CPU: 1 PID: 13107 at fs/kernfs/dir.c:504 kernfs_get.part.0+0x69/0x80 DR3: 0000000000000000 DR6: 00000000ffff4ff0 DR7: 0000000000000400 Modules linked in: CPU: 1 PID: 13107 Comm: systemd-udevd Not tainted 5.19.0-rc5-next-20220705 #1 Call Trace: Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 RIP: 0010:kernfs_get.part.0+0x69/0x80 Code: 31 ff 89 ee e8 c8 0c a7 ff 85 ed 74 18 e8 ef 0f a7 ff be 04 00 00 00 48 89 df e8 d2 ba d9 ff f0 ff 03 5b 5d c3 e8 d7 0f a7 ff <0f> 0b eb df 48 89 df e8 7b b7 d9 ff eb c6 66 0f 1f 84 00 00 00 00 kernfs_put+0x42/0x50 RSP: 0018:ffff88806cf09c80 EFLAGS: 00010046 kernfs_notify_workfn+0x417/0x560 RAX: 0000000000000000 RBX: ffff8880205b10e8 RCX: 0000000000000100 RDX: ffff888045cc9ac0 RSI: ffffffff819de5c9 RDI: 0000000000000005 RBP: 0000000000000000 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000001 process_one_work+0xa0f/0x1690 R13: 1ffffffff0a01e40 R14: ffff8880205b10e8 R15: ffff888042ed0130 FS: 00007fb4ee2638c0(0000) GS:ffff88806cf00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000556f5dccbb00 CR3: 00000000493f8000 CR4: 0000000000350ee0 worker_thread+0x637/0x1250 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff4ff0 DR7: 0000000000000400 Call Trace: kthread+0x2ed/0x3a0 kernfs_get+0x1b/0x30 kernfs_notify+0x180/0x350 ret_from_fork+0x22/0x30 cgroup_file_notify+0xf5/0x1a0 irq event stamp: 516707 call_timer_fn+0x17d/0x5f0 hardirqs last enabled at (516717): [] asm_sysvec_apic_timer_interrupt+0x1b/0x20 hardirqs last disabled at (516724): [] console_emit_next_record.constprop.0+0x667/0x800 softirqs last enabled at (515612): [] __irq_exit_rcu+0x113/0x170 softirqs last disabled at (515603): [] __irq_exit_rcu+0x113/0x170 ---[ end trace 0000000000000000 ]--- ================================================================== BUG: KASAN: use-after-free in llist_del_first+0x89/0xa0 __run_timers.part.0+0x65e/0xa50 Read of size 8 at addr ffff8880205b1168 by task kworker/0:2/10557 CPU: 0 PID: 10557 Comm: kworker/0:2 Tainted: G W 5.19.0-rc5-next-20220705 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 Workqueue: events kernfs_notify_workfn Call Trace: dump_stack_lvl+0x8b/0xb3 run_timer_softirq+0xae/0x1a0 print_report.cold+0x5e/0x5e1 __do_softirq+0x1c8/0x8cc __irq_exit_rcu+0x113/0x170 kasan_report+0xb1/0x1b0 irq_exit_rcu+0x5/0x20 sysvec_apic_timer_interrupt+0x8e/0xc0 llist_del_first+0x89/0xa0 kernfs_notify_workfn+0x78/0x560 asm_sysvec_apic_timer_interrupt+0x1b/0x20 RIP: 0010:mod_objcg_state+0x3af/0x9e0 Code: 00 00 49 c7 44 24 28 00 00 00 00 48 c7 c6 c7 2f 7a 81 4c 89 e7 e8 c1 3e af ff 48 83 3c 24 00 74 06 e8 05 93 d1 ff fb 4d 85 ff <0f> 84 95 00 00 00 48 83 c4 28 4c 89 ff 5b 5d 41 5c 41 5d 41 5e 41 process_one_work+0xa0f/0x1690 RSP: 0018:ffff88804382fda8 EFLAGS: 00000246 RAX: 0000000000008707 RBX: ffff88806cf34ba0 RCX: 1ffffffff0b1ceb1 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 worker_thread+0x637/0x1250 RBP: ffff88806cf34bc8 R08: 0000000000000001 R09: 0000000000000001 R10: 0000000000000001 R11: 0000000000000001 R12: ffff88806cf34ba0 kthread+0x2ed/0x3a0 R13: ffff88807ffdc000 R14: 0000000000000006 R15: 0000000000000000 ret_from_fork+0x22/0x30 kmem_cache_free+0x4c4/0x600 Allocated by task 294: __put_cred+0x12e/0x180 kasan_save_stack+0x1e/0x40 revert_creds+0xaf/0xd0 __kasan_slab_alloc+0x66/0x80 do_faccessat+0x2e7/0x810 kmem_cache_alloc+0x1b1/0x490 __kernfs_new_node+0xd4/0x8b0 kernfs_new_node+0x93/0x120 do_syscall_64+0x3b/0x90 __kernfs_create_file+0x51/0x350 entry_SYSCALL_64_after_hwframe+0x46/0xb0 cgroup_addrm_files+0x3e2/0x9d0 RIP: 0033:0x7fb4ee712ff7 css_populate_dir+0x19b/0x450 Code: 77 01 c3 48 8b 15 99 ee 0c 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 b8 15 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 8b 15 69 ee 0c 00 f7 d8 64 89 02 b8 cgroup_apply_control_enable+0x3ae/0xa40 RSP: 002b:00007ffe0ec91f88 EFLAGS: 00000246 cgroup_mkdir+0x824/0x11f0 ORIG_RAX: 0000000000000015 kernfs_iop_mkdir+0x149/0x1d0 RAX: ffffffffffffffda RBX: 0000556f5dcb3450 RCX: 00007fb4ee712ff7 vfs_mkdir+0x417/0x6a0 RDX: 000000000000000c RSI: 0000000000000000 RDI: 00007ffe0ec91f90 do_mkdirat+0x17b/0x2e0 RBP: 00007ffe0ec91ff0 R08: 0000556f5bafb7e0 R09: 0073656369766564 __x64_sys_mkdir+0xf2/0x140 R10: 0000000000000000 R11: 0000000000000246 R12: 0000556f5dca4a20 do_syscall_64+0x3b/0x90 R13: 00007ffe0ec91f90 R14: 0000556f5dc7bd36 R15: 0000556f5dcb0b10 entry_SYSCALL_64_after_hwframe+0x46/0xb0 Freed by task 10557: irq event stamp: 34573 kasan_save_stack+0x1e/0x40 hardirqs last enabled at (34572): [] _raw_spin_unlock_irq+0x1f/0x40 kasan_set_track+0x21/0x30 hardirqs last disabled at (34573): [] _raw_spin_lock_irqsave+0x4e/0x50 kasan_set_free_info+0x20/0x30 softirqs last enabled at (34540): [] __irq_exit_rcu+0x113/0x170 __kasan_slab_free+0x108/0x190 softirqs last disabled at (34569): [] __irq_exit_rcu+0x113/0x170 kmem_cache_free+0xfb/0x600 ---[ end trace 0000000000000000 ]--- 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 ffff8880205b10e8 which belongs to the cache kernfs_node_cache of size 168 The buggy address is located 128 bytes inside of 168-byte region [ffff8880205b10e8, ffff8880205b1190) The buggy address belongs to the physical page: page:000000001996d544 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x205b1 flags: 0x100000000000200(slab|node=0|zone=1) raw: 0100000000000200 0000000000000000 dead000000000122 ffff8880080358c0 raw: 0000000000000000 0000000000110011 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880205b1000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880205b1080: 00 00 00 00 00 fc fc fc fc fc fc fc fc fa fb fb >ffff8880205b1100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880205b1180: fb fb fc fc fc fc fc fc fc fc 00 00 00 00 00 00 ffff8880205b1200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc ================================================================== kmemleak: 96 new suspected memory leaks (see /sys/kernel/debug/kmemleak) ---------------- Code disassembly (best guess): 0: 00 00 add %al,(%rax) 2: 49 c7 44 24 28 00 00 movq $0x0,0x28(%r12) 9: 00 00 b: 48 c7 c6 c7 2f 7a 81 mov $0xffffffff817a2fc7,%rsi 12: 4c 89 e7 mov %r12,%rdi 15: e8 c1 3e af ff callq 0xffaf3edb 1a: 48 83 3c 24 00 cmpq $0x0,(%rsp) 1f: 74 06 je 0x27 21: e8 05 93 d1 ff callq 0xffd1932b 26: fb sti 27: 4d 85 ff test %r15,%r15 * 2a: 0f 84 95 00 00 00 je 0xc5 <-- trapping instruction 30: 48 83 c4 28 add $0x28,%rsp 34: 4c 89 ff mov %r15,%rdi 37: 5b pop %rbx 38: 5d pop %rbp 39: 41 5c pop %r12 3b: 41 5d pop %r13 3d: 41 5e pop %r14 3f: 41 rex.B