================================================ WARNING: lock held when returning to user space! 6.18.0-rc7-next-20251128 #1 Not tainted ------------------------------------------------ syz-executor.6/4773 is leaving the kernel with locks still held! 1 lock held by syz-executor.6/4773: #0: ffff88800b152a08 (&sb->s_type->i_mutex_key#19/1){+.+.}-{4:4}, at: start_creating_noperm+0x84/0xd0 9p: Bad value for 'rfdno' 9p: Bad value for 'rfdno' kauditd_printk_skb: 46 callbacks suppressed audit: type=1326 audit(1764455443.585:937): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=4785 comm="syz-executor.3" exe="/syz-executor.3" sig=0 arch=c000003e syscall=202 compat=0 ip=0x7fc53f1eab19 code=0x7ffc0000 audit: type=1326 audit(1764455443.588:938): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=4785 comm="syz-executor.3" exe="/syz-executor.3" sig=0 arch=c000003e syscall=202 compat=0 ip=0x7fc53f1eab19 code=0x7ffc0000 ================================================================== BUG: KASAN: slab-use-after-free in rwsem_down_write_slowpath+0x1522/0x1670 Read of size 4 at addr ffff88804bdd9bf4 by task syz-executor.6/4799 CPU: 1 UID: 0 PID: 4799 Comm: syz-executor.6 Not tainted 6.18.0-rc7-next-20251128 #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:0x7f7789ee3b19 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:00007f7787459188 EFLAGS: 00000246 ORIG_RAX: 00000000000000f0 RAX: ffffffffffffffda RBX: 00007f7789ff6f60 RCX: 00007f7789ee3b19 RDX: 000000000000018b RSI: 0000000000000000 RDI: 00000000200002c0 RBP: 00007f7789f3df6d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffdaca44edf R14: 00007f7787459300 R15: 0000000000022000 Allocated by task 4770: 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 294: 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 __irq_exit_rcu+0xc4/0x100 irq_exit_rcu+0x9/0x20 sysvec_apic_timer_interrupt+0x70/0x80 asm_sysvec_apic_timer_interrupt+0x1a/0x20 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 do_softirq+0x48/0x80 __local_bh_enable_ip+0xf1/0x110 cfg80211_inform_single_bss_data+0x877/0x1cf0 cfg80211_inform_bss_data+0x215/0x34f0 cfg80211_inform_bss_frame_data+0x253/0x690 ieee80211_bss_info_update+0x2f5/0xa90 ieee80211_ibss_rx_queued_mgmt+0x18f3/0x2f60 ieee80211_iface_work+0xd4c/0x1220 cfg80211_wiphy_work+0x39c/0x5d0 process_one_work+0x8e1/0x1960 worker_thread+0x67e/0xe90 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 dput.part.0+0x24/0x530 dput+0x1f/0x30 path_openat+0x1d64/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 The buggy address belongs to the object at ffff88804bdd9bc0 which belongs to the cache task_struct of size 6848 The buggy address is located 52 bytes inside of freed 6848-byte region [ffff88804bdd9bc0, ffff88804bddb680) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x4bdd8 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff88800c382b01 flags: 0x100000000000040(head|node=0|zone=1) page_type: f5(slab) raw: 0100000000000040 ffff88800944c640 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000040004 00000000f5000000 ffff88800c382b01 head: 0100000000000040 ffff88800944c640 dead000000000122 0000000000000000 head: 0000000000000000 0000000000040004 00000000f5000000 ffff88800c382b01 head: 0100000000000003 ffffea00012f7601 00000000ffffffff 00000000ffffffff head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000008 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88804bdd9a80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff88804bdd9b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88804bdd9b80: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ^ ffff88804bdd9c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804bdd9c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== audit: type=1326 audit(1764455443.599:939): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=4785 comm="syz-executor.3" exe="/syz-executor.3" sig=0 arch=c000003e syscall=71 compat=0 ip=0x7fc53f1eab19 code=0x7ffc0000 audit: type=1326 audit(1764455443.599:940): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=4785 comm="syz-executor.3" exe="/syz-executor.3" sig=0 arch=c000003e syscall=202 compat=0 ip=0x7fc53f1eab19 code=0x7ffc0000 audit: type=1326 audit(1764455443.599:941): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=4785 comm="syz-executor.3" exe="/syz-executor.3" sig=0 arch=c000003e syscall=202 compat=0 ip=0x7fc53f1eab19 code=0x7ffc0000 audit: type=1326 audit(1764455443.601:942): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=4795 comm="syz-executor.2" exe="/syz-executor.2" sig=0 arch=c000003e syscall=202 compat=0 ip=0x7fe481b71b19 code=0x7ffc0000 audit: type=1326 audit(1764455443.603:943): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=4785 comm="syz-executor.3" exe="/syz-executor.3" sig=0 arch=c000003e syscall=68 compat=0 ip=0x7fc53f1eab19 code=0x7ffc0000 audit: type=1326 audit(1764455443.603:944): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=4785 comm="syz-executor.3" exe="/syz-executor.3" sig=0 arch=c000003e syscall=202 compat=0 ip=0x7fc53f1eab19 code=0x7ffc0000 audit: type=1326 audit(1764455443.604:945): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=4785 comm="syz-executor.3" exe="/syz-executor.3" sig=0 arch=c000003e syscall=41 compat=0 ip=0x7fc53f1eab19 code=0x7ffc0000 audit: type=1326 audit(1764455443.607:946): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=4785 comm="syz-executor.3" exe="/syz-executor.3" sig=0 arch=c000003e syscall=202 compat=0 ip=0x7fc53f1eab19 code=0x7ffc0000 9p: Bad value for 'rfdno' 9p: Bad value for 'rfdno' 9p: Bad value for 'rfdno'