RBP: 00007ff234d641d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffc3d68c54f R14: 00007ff234d64300 R15: 0000000000022000 general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] PREEMPT SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f] CPU: 1 PID: 7358 Comm: syz-executor.5 Not tainted 6.3.0-rc7-next-20230418 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 RIP: 0010:folio_wait_stable+0x23/0xe0 Code: 90 90 90 90 90 90 90 f3 0f 1e fa 55 48 89 fd 53 e8 32 58 e7 ff 48 8d 7d 18 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 a4 00 00 00 48 b8 00 00 00 00 00 fc ff df 48 8b RSP: 0018:ffff88803d41f660 EFLAGS: 00010213 RAX: dffffc0000000000 RBX: ffff88801bb20c98 RCX: ffffc90007e20000 RDX: 0000000000000001 RSI: ffffffff81647cce RDI: 000000000000000c RBP: fffffffffffffff4 R08: 0000000000000001 R09: ffffffff856c1693 R10: fffffbfff0ad82d2 R11: 0000000000000001 R12: 0000000000000000 R13: ffff88801bb20ec0 R14: 0000000000000000 R15: 0000000000000000 FS: 00007ff234d64700(0000) GS:ffff88806cf00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000555556b4e708 CR3: 0000000044080000 CR4: 0000000000350ee0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600 Call Trace: ext4_da_write_begin+0x38d/0x830 generic_perform_write+0x25a/0x580 ext4_buffered_write_iter+0x164/0x460 ext4_file_write_iter+0x3ff/0x1950 __kernel_write_iter+0x264/0x7b0 __kernel_write+0xcb/0x110 do_acct_process+0xd8a/0x1400 acct_pin_kill+0x2d/0x100 pin_kill+0x16f/0x8f0 mnt_pin_kill+0x66/0x1f0 cleanup_mnt+0x321/0x3d0 task_work_run+0x174/0x280 exit_to_user_mode_prepare+0x17d/0x180 syscall_exit_to_user_mode+0x1d/0x50 do_syscall_64+0x4c/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc RIP: 0033:0x7ff2377eeb19 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:00007ff234d64188 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00007ff237901f60 RCX: 00007ff2377eeb19 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000140 RBP: 00007ff234d641d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffc3d68c54f R14: 00007ff234d64300 R15: 0000000000022000 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:folio_wait_stable+0x23/0xe0 Code: 90 90 90 90 90 90 90 f3 0f 1e fa 55 48 89 fd 53 e8 32 58 e7 ff 48 8d 7d 18 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 a4 00 00 00 48 b8 00 00 00 00 00 fc ff df 48 8b RSP: 0018:ffff88803d41f660 EFLAGS: 00010213 RAX: dffffc0000000000 RBX: ffff88801bb20c98 RCX: ffffc90007e20000 RDX: 0000000000000001 RSI: ffffffff81647cce RDI: 000000000000000c RBP: fffffffffffffff4 R08: 0000000000000001 R09: ffffffff856c1693 R10: fffffbfff0ad82d2 R11: 0000000000000001 R12: 0000000000000000 R13: ffff88801bb20ec0 R14: 0000000000000000 R15: 0000000000000000 FS: 00007ff234d64700(0000) GS:ffff88806cf00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000555556b4e708 CR3: 0000000044080000 CR4: 0000000000350ee0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600 Process accounting resumed FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 1 PID: 7387 Comm: syz-executor.7 Tainted: G D 6.3.0-rc7-next-20230418 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 Call Trace: dump_stack_lvl+0xc1/0xf0 should_fail_ex+0x4b4/0x5b0 should_failslab+0x9/0x20 kmem_cache_alloc+0x5a/0x390 __alloc_file+0x21/0x240 alloc_empty_file+0x71/0x190 path_openat+0xd8/0x2750 do_filp_open+0x1ba/0x410 file_open_name+0x2d9/0x450 acct_on+0x78/0x790 __x64_sys_acct+0xaf/0x220 do_syscall_64+0x3f/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc RIP: 0033:0x7f22d8e31b19 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:00007f22d63a7188 EFLAGS: 00000246 ORIG_RAX: 00000000000000a3 RAX: ffffffffffffffda RBX: 00007f22d8f44f60 RCX: 00007f22d8e31b19 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000400 RBP: 00007f22d63a71d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007fffd90aa11f R14: 00007f22d63a7300 R15: 0000000000022000 FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 0 PID: 7393 Comm: syz-executor.3 Tainted: G D 6.3.0-rc7-next-20230418 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 Call Trace: dump_stack_lvl+0xc1/0xf0 should_fail_ex+0x4b4/0x5b0 should_failslab+0x9/0x20 __kmem_cache_alloc_node+0x5b/0x310 __kmalloc_node_track_caller+0x4b/0x160 kstrdup+0x3f/0x80 kstrdup_const+0x57/0x80 alloc_vfsmnt+0xb5/0x6c0 clone_mnt+0x6c/0xd80 mnt_clone_internal+0x60/0xf0 acct_on+0x16b/0x790 __x64_sys_acct+0xaf/0x220 do_syscall_64+0x3f/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc RIP: 0033:0x7f19c0368b19 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:00007f19bd8de188 EFLAGS: 00000246 ORIG_RAX: 00000000000000a3 RAX: ffffffffffffffda RBX: 00007f19c047bf60 RCX: 00007f19c0368b19 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000400 RBP: 00007f19bd8de1d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 00007ffee9e614bf R14: 00007f19bd8de300 R15: 0000000000022000 ================================================================== BUG: KASAN: slab-use-after-free in __mutex_lock+0x19db/0x1a30 Read of size 4 at addr ffff888046bcd074 by task syz-executor.5/7355 CPU: 0 PID: 7355 Comm: syz-executor.5 Tainted: G D 6.3.0-rc7-next-20230418 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 Call Trace: dump_stack_lvl+0x91/0xf0 print_report+0xcc/0x620 kasan_report+0xc0/0xf0 __mutex_lock+0x19db/0x1a30 acct_process+0x1e2/0x570 do_exit+0x1812/0x2720 do_group_exit+0xd4/0x2a0 __x64_sys_exit_group+0x3e/0x50 do_syscall_64+0x3f/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc RIP: 0033:0x7ff2377eeb19 Code: Unable to access opcode bytes at 0x7ff2377eeaef. RSP: 002b:00007ffc3d68c778 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 000000000000001e RCX: 00007ff2377eeb19 RDX: 00007ff2377a172b RSI: ffffffffffffffbc RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000001b2c422ca4 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 0000000000000001 R14: 0000000000000001 R15: 00007ffc3d68c860 Allocated by task 7355: kasan_save_stack+0x22/0x50 kasan_set_track+0x25/0x30 __kasan_slab_alloc+0x59/0x70 kmem_cache_alloc_node+0x189/0x3a0 copy_process+0x3c2/0x7330 kernel_clone+0xeb/0x7d0 __do_sys_clone+0xba/0x100 do_syscall_64+0x3f/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc Freed by task 238: kasan_save_stack+0x22/0x50 kasan_set_track+0x25/0x30 kasan_save_free_info+0x2e/0x50 __kasan_slab_free+0x10a/0x190 kmem_cache_free+0xff/0x4a0 delayed_put_task_struct+0x1c9/0x240 rcu_core+0x899/0x2750 __do_softirq+0x1b7/0x7d4 Last potentially related work creation: kasan_save_stack+0x22/0x50 __kasan_record_aux_stack+0x95/0xb0 __call_rcu_common.constprop.0+0x6a/0xb90 put_task_struct_rcu_user+0x87/0xd0 __schedule+0x995/0x2a00 schedule+0xdb/0x1a0 exit_to_user_mode_prepare+0x95/0x180 irqentry_exit_to_user_mode+0x9/0x30 asm_sysvec_apic_timer_interrupt+0x1a/0x20 Second to last potentially related work creation: kasan_save_stack+0x22/0x50 __kasan_record_aux_stack+0x95/0xb0 __call_rcu_common.constprop.0+0x6a/0xb90 put_task_struct_rcu_user+0x87/0xd0 __schedule+0x995/0x2a00 schedule+0xdb/0x1a0 do_nanosleep+0x154/0x510 hrtimer_nanosleep+0x208/0x590 __x64_sys_nanosleep+0x216/0x2a0 do_syscall_64+0x3f/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc The buggy address belongs to the object at ffff888046bcd040 which belongs to the cache task_struct of size 6592 The buggy address is located 52 bytes inside of freed 6592-byte region [ffff888046bcd040, ffff888046bcea00) The buggy address belongs to the physical page: page:00000000f421c397 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x46bc8 head:00000000f421c397 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff88800c944501 flags: 0x100000000010200(slab|head|node=0|zone=1) page_type: 0xffffffff() raw: 0100000000010200 ffff888008797640 ffffea000067f400 dead000000000002 raw: 0000000000000000 0000000000040004 00000001ffffffff ffff88800c944501 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888046bccf00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff888046bccf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888046bcd000: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ^ ffff888046bcd080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888046bcd100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess): 0: 90 nop 1: 90 nop 2: 90 nop 3: 90 nop 4: 90 nop 5: 90 nop 6: 90 nop 7: f3 0f 1e fa endbr64 b: 55 push %rbp c: 48 89 fd mov %rdi,%rbp f: 53 push %rbx 10: e8 32 58 e7 ff callq 0xffe75847 15: 48 8d 7d 18 lea 0x18(%rbp),%rdi 19: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 20: fc ff df 23: 48 89 fa mov %rdi,%rdx 26: 48 c1 ea 03 shr $0x3,%rdx * 2a: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) <-- trapping instruction 2e: 0f 85 a4 00 00 00 jne 0xd8 34: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 3b: fc ff df 3e: 48 rex.W 3f: 8b .byte 0x8b