================================================ WARNING: lock held when returning to user space! 6.18.0-rc7-next-20251127 #1 Not tainted ------------------------------------------------ syz-executor.6/6641 is leaving the kernel with locks still held! 1 lock held by syz-executor.6/6641: loop7: detected capacity change from 0 to 64 #0: ffff88800b7ca348 (&sb->s_type->i_mutex_key#18/1){+.+.}-{4:4}, at: start_creating_noperm+0x84/0xd0 FAT-fs (loop7): bogus number of FAT sectors FAT-fs (loop7): Can't find a valid FAT filesystem loop5: detected capacity change from 0 to 16 EXT4-fs (loop5): couldn't mount as ext2 due to feature incompatibilities loop7: detected capacity change from 0 to 64 FAT-fs (loop7): bogus number of FAT sectors FAT-fs (loop7): Can't find a valid FAT filesystem ================================================================== BUG: KASAN: slab-use-after-free in rwsem_down_write_slowpath+0x1522/0x1670 Read of size 4 at addr ffff888016b29bf4 by task syz-executor.6/6666 CPU: 0 UID: 0 PID: 6666 Comm: syz-executor.6 Not tainted 6.18.0-rc7-next-20251127 #1 PREEMPT(voluntary) Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 Call Trace: dump_stack_lvl+0xca/0x120 print_report+0xcb/0x610 kasan_report+0xca/0x100 rwsem_down_write_slowpath+0x1522/0x1670 down_write_nested+0x1c6/0x1f0 start_creating_noperm+0x84/0xd0 do_mq_open+0x25f/0x980 __x64_sys_mq_open+0x14f/0x1e0 do_syscall_64+0xbf/0x420 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7ff8b23a4b19 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:00007ff8af91a188 EFLAGS: 00000246 ORIG_RAX: 00000000000000f0 RAX: ffffffffffffffda RBX: 00007ff8b24b7f60 RCX: 00007ff8b23a4b19 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000080 RBP: 00007ff8b23fef6d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd8fad2c2f R14: 00007ff8af91a300 R15: 0000000000022000 Allocated by task 6639: kasan_save_stack+0x24/0x50 kasan_save_track+0x14/0x30 __kasan_slab_alloc+0x59/0x70 kmem_cache_alloc_node_noprof+0x228/0x730 copy_process+0x460/0x7230 kernel_clone+0xea/0x7c0 __do_sys_clone+0xce/0x120 do_syscall_64+0xbf/0x420 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 22: kasan_save_stack+0x24/0x50 kasan_save_track+0x14/0x30 kasan_save_free_info+0x3a/0x60 __kasan_slab_free+0x43/0x70 kmem_cache_free+0x2cd/0x660 rcu_core+0x73c/0x1ed0 handle_softirqs+0x1b1/0x740 run_ksoftirqd+0x2e/0x60 smpboot_thread_fn+0x41d/0x9d0 kthread+0x3c8/0x740 ret_from_fork+0x67a/0x7a0 ret_from_fork_asm+0x1a/0x30 Last potentially related work creation: kasan_save_stack+0x24/0x50 kasan_record_aux_stack+0x89/0xa0 __call_rcu_common.constprop.0+0x70/0xad0 delayed_put_task_struct+0xde/0x230 rcu_core+0x73c/0x1ed0 handle_softirqs+0x1b1/0x740 run_ksoftirqd+0x2e/0x60 smpboot_thread_fn+0x41d/0x9d0 kthread+0x3c8/0x740 ret_from_fork+0x67a/0x7a0 ret_from_fork_asm+0x1a/0x30 Second to last potentially related work creation: kasan_save_stack+0x24/0x50 kasan_record_aux_stack+0x89/0xa0 __call_rcu_common.constprop.0+0x70/0xad0 put_task_struct_rcu_user+0x75/0xc0 __schedule+0x1003/0x46a0 __cond_resched+0x4c/0x80 __mutex_lock+0xc5/0x2090 sched_mm_cid_exit+0x9a/0x450 do_exit+0x2db/0x2950 do_group_exit+0xd3/0x2a0 __x64_sys_exit_group+0x3e/0x50 x64_sys_call+0x18d6/0x18e0 do_syscall_64+0xbf/0x420 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888016b29bc0 which belongs to the cache task_struct of size 6848 The buggy address is located 52 bytes inside of freed 6848-byte region [ffff888016b29bc0, ffff888016b2b680) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888016b2d340 pfn:0x16b28 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff88800b9608c1 flags: 0x100000000000240(workingset|head|node=0|zone=1) page_type: f5(slab) raw: 0100000000000240 ffff88800944c640 ffffea000033ea10 ffffea00007a2610 raw: ffff888016b2d340 0000000000040002 00000000f5000000 ffff88800b9608c1 head: 0100000000000240 ffff88800944c640 ffffea000033ea10 ffffea00007a2610 head: ffff888016b2d340 0000000000040002 00000000f5000000 ffff88800b9608c1 head: 0100000000000003 ffffea00005aca01 00000000ffffffff 00000000ffffffff head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000008 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888016b29a80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff888016b29b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888016b29b80: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ^ ffff888016b29c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888016b29c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== loop7: detected capacity change from 0 to 64 FAT-fs (loop7): bogus number of FAT sectors FAT-fs (loop7): Can't find a valid FAT filesystem loop2: detected capacity change from 0 to 64 FAT-fs (loop2): Invalid FSINFO signature: 0x00000000, 0x00000000 (sector = 1) FAULT_INJECTION: forcing a failure. name fail_usercopy, interval 1, probability 0, space 0, times 0 CPU: 1 UID: 0 PID: 6680 Comm: syz-executor.5 Tainted: G B 6.18.0-rc7-next-20251127 #1 PREEMPT(voluntary) Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 Call Trace: dump_stack_lvl+0xfa/0x120 should_fail_ex+0x4d7/0x5e0 strncpy_from_user+0x3b/0x2f0 getname_flags.part.0+0x8d/0x540 getname_flags+0x95/0xe0 do_sys_openat2+0x9f/0x240 __x64_sys_openat+0x142/0x200 do_syscall_64+0xbf/0x420 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f7ca8fcfa04 Code: 84 00 00 00 00 00 44 89 54 24 0c e8 96 f9 ff ff 44 8b 54 24 0c 44 89 e2 48 89 ee 41 89 c0 bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 77 34 44 89 c7 89 44 24 0c e8 c8 f9 ff ff 8b 44 RSP: 002b:00007f7ca6591ed0 EFLAGS: 00000293 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f7ca9066970 RCX: 00007f7ca8fcfa04 RDX: 0000000000000002 RSI: 00007f7ca6592000 RDI: 00000000ffffff9c RBP: 00007f7ca6592000 R08: 0000000000000000 R09: ffffffffffffffff R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000002 R13: 0000000000000004 R14: 0000000020000230 R15: 0000000000000002 loop7: detected capacity change from 0 to 64 FAT-fs (loop7): bogus number of FAT sectors loop2: detected capacity change from 0 to 64 FAT-fs (loop7): Can't find a valid FAT filesystem FAT-fs (loop2): Invalid FSINFO signature: 0x00000000, 0x00000000 (sector = 1) FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 0 UID: 0 PID: 6700 Comm: syz-executor.5 Tainted: G B 6.18.0-rc7-next-20251127 #1 PREEMPT(voluntary) Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 Call Trace: dump_stack_lvl+0xfa/0x120 should_fail_ex+0x4d7/0x5e0 should_failslab+0xc2/0x120 kmem_cache_alloc_noprof+0x80/0x710 alloc_empty_file+0x58/0x1e0 path_openat+0xee/0x2d30 do_filp_open+0x1e8/0x450 do_sys_openat2+0x107/0x240 __x64_sys_openat+0x142/0x200 do_syscall_64+0xbf/0x420 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f7ca8fcfa04 Code: 84 00 00 00 00 00 44 89 54 24 0c e8 96 f9 ff ff 44 8b 54 24 0c 44 89 e2 48 89 ee 41 89 c0 bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 77 34 44 89 c7 89 44 24 0c e8 c8 f9 ff ff 8b 44 RSP: 002b:00007f7ca6591ed0 EFLAGS: 00000293 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f7ca9066970 RCX: 00007f7ca8fcfa04 RDX: 0000000000000002 RSI: 00007f7ca6592000 RDI: 00000000ffffff9c RBP: 00007f7ca6592000 R08: 0000000000000000 R09: ffffffffffffffff R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000002 R13: 0000000000000004 R14: 0000000020000230 R15: 0000000000000002