================================================================== BUG: KASAN: slab-use-after-free in _raw_spin_lock+0x2b/0x40 Read of size 1 at addr ffff88800b38a1d8 by task syz-executor.1/3816 CPU: 1 UID: 0 PID: 3816 Comm: syz-executor.1 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 __kasan_check_byte+0x3a/0x50 lock_acquire+0xec/0x2d0 _raw_spin_lock+0x2b/0x40 mqueue_flush_file+0x47/0x110 filp_flush+0x12c/0x1d0 __x64_sys_close+0x85/0x120 do_syscall_64+0xbf/0x420 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f8172a0b72b Code: 0f 05 48 3d 00 f0 ff ff 77 45 c3 0f 1f 40 00 48 83 ec 18 89 7c 24 0c e8 63 fc ff ff 8b 7c 24 0c 41 89 c0 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 35 44 89 c7 89 44 24 0c e8 a1 fc ff ff 8b 44 RSP: 002b:00007ffc83433480 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 00007f8172a0b72b RDX: 00007f8172b70ba8 RSI: 0000000000000081 RDI: 0000000000000004 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000293 R12: 00007f8172b70ba8 R13: 00007ffc834335a0 R14: 00007f8172b6bf60 R15: 00000000000177af Allocated by task 3819: kasan_save_stack+0x24/0x50 kasan_save_track+0x14/0x30 __kasan_slab_alloc+0x59/0x70 kmem_cache_alloc_lru_noprof+0x217/0x720 mqueue_alloc_inode+0x27/0x50 alloc_inode+0x67/0x250 new_inode+0x1e/0x160 mqueue_get_inode+0x2e/0xdf0 mqueue_create_attr+0x1df/0x460 vfs_mkobj+0x3d5/0x620 do_mq_open+0x7a3/0x980 __x64_sys_mq_open+0x14f/0x1e0 do_syscall_64+0xbf/0x420 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 3826: 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 i_callback+0x46/0x70 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 destroy_inode+0x12b/0x1b0 evict+0x4fe/0x9e0 iput.part.0+0x7ea/0xeb0 iput+0x35/0x40 __do_sys_mq_unlink+0x2a3/0x3d0 do_syscall_64+0xbf/0x420 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88800b38a1c0 which belongs to the cache mqueue_inode_cache of size 1568 The buggy address is located 24 bytes inside of freed 1568-byte region [ffff88800b38a1c0, ffff88800b38a7e0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xb388 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff88800e25d801 flags: 0x100000000000040(head|node=0|zone=1) page_type: f5(slab) raw: 0100000000000040 ffff88800a9b2a00 dead000000000122 0000000000000000 raw: 0000000000000000 0000000080120012 00000000f5000000 ffff88800e25d801 head: 0100000000000040 ffff88800a9b2a00 dead000000000122 0000000000000000 head: 0000000000000000 0000000080120012 00000000f5000000 ffff88800e25d801 head: 0100000000000003 ffffea00002ce201 00000000ffffffff 00000000ffffffff head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000008 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88800b38a080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88800b38a100: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc >ffff88800b38a180: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ^ ffff88800b38a200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88800b38a280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== Oops: general protection fault, probably for non-canonical address 0xdffffc0000000005: 0000 [#1] SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000028-0x000000000000002f] CPU: 1 UID: 0 PID: 3816 Comm: syz-executor.1 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 RIP: 0010:__fput+0x1cc/0xb50 Code: 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 f6 08 00 00 48 b8 00 00 00 00 00 fc ff df 4d 8b 7e 68 49 8d 7f 28 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 c9 08 00 00 48 ba 00 00 00 00 00 fc ff df 49 8b RSP: 0018:ffff888016f47e08 EFLAGS: 00010216 RAX: dffffc0000000000 RBX: ffff88800b38a200 RCX: ffffffff81b95f1e RDX: 0000000000000005 RSI: 0000000000000008 RDI: 0000000000000028 RBP: ffff8880169ad6c0 R08: 0000000000000000 R09: fffffbfff0cca14a R10: 0000000004000000 R11: 0000000040000000 R12: ffff8880169ad700 R13: 0000000000000010 R14: ffff88801c883318 R15: 0000000000000000 FS: 000055558c43a400(0000) GS:ffff8880e547a000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f666c27d7f0 CR3: 000000000c520000 CR4: 0000000000350ef0 Call Trace: fput_close_sync+0x10f/0x230 __x64_sys_close+0x8f/0x120 do_syscall_64+0xbf/0x420 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f8172a0b72b Code: 0f 05 48 3d 00 f0 ff ff 77 45 c3 0f 1f 40 00 48 83 ec 18 89 7c 24 0c e8 63 fc ff ff 8b 7c 24 0c 41 89 c0 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 35 44 89 c7 89 44 24 0c e8 a1 fc ff ff 8b 44 RSP: 002b:00007ffc83433480 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 00007f8172a0b72b RDX: 00007f8172b70ba8 RSI: 0000000000000081 RDI: 0000000000000004 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000293 R12: 00007f8172b70ba8 R13: 00007ffc834335a0 R14: 00007f8172b6bf60 R15: 00000000000177af Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:__fput+0x1cc/0xb50 Code: 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 f6 08 00 00 48 b8 00 00 00 00 00 fc ff df 4d 8b 7e 68 49 8d 7f 28 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 c9 08 00 00 48 ba 00 00 00 00 00 fc ff df 49 8b RSP: 0018:ffff888016f47e08 EFLAGS: 00010216 RAX: dffffc0000000000 RBX: ffff88800b38a200 RCX: ffffffff81b95f1e RDX: 0000000000000005 RSI: 0000000000000008 RDI: 0000000000000028 RBP: ffff8880169ad6c0 R08: 0000000000000000 R09: fffffbfff0cca14a R10: 0000000004000000 R11: 0000000040000000 R12: ffff8880169ad700 R13: 0000000000000010 R14: ffff88801c883318 R15: 0000000000000000 FS: 000055558c43a400(0000) GS:ffff8880e547a000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f666c27d7f0 CR3: 000000000c520000 CR4: 0000000000350ef0 ieee80211 phy8: Selected rate control algorithm 'minstrel_ht' wlan0: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan0: Creating new IBSS network, BSSID 50:50:50:50:50:50 ieee80211 phy9: Selected rate control algorithm 'minstrel_ht' wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 ieee80211 phy10: Selected rate control algorithm 'minstrel_ht' wlan0: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan0: Creating new IBSS network, BSSID 50:50:50:50:50:50 ieee80211 phy11: Selected rate control algorithm 'minstrel_ht' wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 ieee80211 phy12: Selected rate control algorithm 'minstrel_ht' wlan0: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 ieee80211 phy13: Selected rate control algorithm 'minstrel_ht' wlan0: Creating new IBSS network, BSSID 50:50:50:50:50:50 wlan0: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan0: Creating new IBSS network, BSSID 50:50:50:50:50:50 ieee80211 phy14: Selected rate control algorithm 'minstrel_ht' ieee80211 phy15: Selected rate control algorithm 'minstrel_ht' wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 ieee80211 phy16: Selected rate control algorithm 'minstrel_ht' wlan0: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan0: Creating new IBSS network, BSSID 50:50:50:50:50:50 ieee80211 phy17: Selected rate control algorithm 'minstrel_ht' wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 UDPLite6: UDP-Lite is deprecated and scheduled to be removed in 2025, please contact the netdev mailing list audit: type=1400 audit(1764230892.547:10): avc: denied { associate } for pid=4270 comm="syz-executor.0" name="sr0" dev="devtmpfs" ino=116 scontext=system_u:object_r:init_runtime_t:s0 tcontext=system_u:object_r:device_t:s0 tclass=filesystem permissive=1 autofs: Bad value for 'gid' autofs: Bad value for 'gid' autofs: Bad value for 'gid' autofs: Bad value for 'gid' autofs: Bad value for 'gid' autofs: Bad value for 'gid' autofs: Bad value for 'gid' autofs: Bad value for 'gid' autofs: Bad value for 'gid' autofs: Bad value for 'gid' autofs: Bad value for 'gid' autofs: Bad value for 'gid' autofs: Bad value for 'gid' autofs: Bad value for 'gid' UDC core: USB Raw Gadget: couldn't find an available UDC or it's busy misc raw-gadget: fail, usb_gadget_register_driver returned -16 UDC core: USB Raw Gadget: couldn't find an available UDC or it's busy misc raw-gadget: fail, usb_gadget_register_driver returned -16 UDC core: USB Raw Gadget: couldn't find an available UDC or it's busy misc raw-gadget: fail, usb_gadget_register_driver returned -16 UDC core: USB Raw Gadget: couldn't find an available UDC or it's busy misc raw-gadget: fail, usb_gadget_register_driver returned -16 audit: type=1400 audit(1764230894.388:11): avc: denied { watch_reads } for pid=4457 comm="syz-executor.5" path="/syzkaller-testdir604817437/syzkaller.nrAleg/36/file0" dev="tmpfs" ino=1 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:tmpfs_t:s0 tclass=dir permissive=1 UDC core: USB Raw Gadget: couldn't find an available UDC or it's busy misc raw-gadget: fail, usb_gadget_register_driver returned -16 program syz-executor.1 is using a deprecated SCSI ioctl, please convert it to SG_IO program syz-executor.1 is using a deprecated SCSI ioctl, please convert it to SG_IO program syz-executor.1 is using a deprecated SCSI ioctl, please convert it to SG_IO program syz-executor.1 is using a deprecated SCSI ioctl, please convert it to SG_IO ---------------- Code disassembly (best guess): 0: 48 89 fa mov %rdi,%rdx 3: 48 c1 ea 03 shr $0x3,%rdx 7: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) b: 0f 85 f6 08 00 00 jne 0x907 11: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 18: fc ff df 1b: 4d 8b 7e 68 mov 0x68(%r14),%r15 1f: 49 8d 7f 28 lea 0x28(%r15),%rdi 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 c9 08 00 00 jne 0x8fd 34: 48 ba 00 00 00 00 00 movabs $0xdffffc0000000000,%rdx 3b: fc ff df 3e: 49 rex.WB 3f: 8b .byte 0x8b