================================================================== BUG: KASAN: slab-use-after-free in perf_trace_lock_acquire+0x533/0x700 Read of size 8 at addr ffff88804f2d0030 by task syz-executor.7/7060 CPU: 1 UID: 0 PID: 7060 Comm: syz-executor.7 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 perf_trace_lock_acquire+0x533/0x700 lock_acquire+0xc5/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:0x7f58b382472b 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:00007ffc5ab2b1b0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: ffffffffffffffda RBX: 0000000000000009 RCX: 00007f58b382472b RDX: 00007f58b398a750 RSI: ffffffff84c96431 RDI: 0000000000000008 RBP: 0000000000000001 R08: 0000000000000000 R09: 0000001b2d5250d0 R10: 0000000000000c8e R11: 0000000000000293 R12: 000000000002bdf8 R13: 00000000000003e8 R14: 00007f58b3984f60 R15: 000000000002bde4 Allocated by task 7064: 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 7063: 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 ffff88804f2d0000 which belongs to the cache mqueue_inode_cache of size 1568 The buggy address is located 48 bytes inside of freed 1568-byte region [ffff88804f2d0000, ffff88804f2d0620) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x4f2d0 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff88805006be01 flags: 0x100000000000040(head|node=0|zone=1) page_type: f5(slab) raw: 0100000000000040 ffff8880099c2500 dead000000000122 0000000000000000 raw: 0000000000000000 0000000080120012 00000000f5000000 ffff88805006be01 head: 0100000000000040 ffff8880099c2500 dead000000000122 0000000000000000 head: 0000000000000000 0000000080120012 00000000f5000000 ffff88805006be01 head: 0100000000000003 ffffea00013cb401 00000000ffffffff 00000000ffffffff head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000008 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88804f2cff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88804f2cff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88804f2d0000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88804f2d0080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804f2d0100: 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: 7060 Comm: syz-executor.7 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:ffff88804d7efe08 EFLAGS: 00010216 RAX: dffffc0000000000 RBX: ffff88804f2d0040 RCX: ffffffff81b95f1e RDX: 0000000000000005 RSI: 0000000000000008 RDI: 0000000000000028 RBP: ffff888016ece1c0 R08: 0000000000000000 R09: fffffbfff0cca14a R10: 0000000004000000 R11: 0000000000000000 R12: ffff888016ece200 R13: 0000000000000010 R14: ffff88801f3591a0 R15: 0000000000000000 FS: 000055555d0ba400(0000) GS:ffff8880e547a000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055557a136708 CR3: 0000000016952000 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:0x7f58b382472b 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:00007ffc5ab2b1b0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: ffffffffffffffda RBX: 0000000000000009 RCX: 00007f58b382472b RDX: 00007f58b398a750 RSI: ffffffff84c96431 RDI: 0000000000000008 RBP: 0000000000000001 R08: 0000000000000000 R09: 0000001b2d5250d0 R10: 0000000000000c8e R11: 0000000000000293 R12: 000000000002bdf8 R13: 00000000000003e8 R14: 00007f58b3984f60 R15: 000000000002bde4 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:ffff88804d7efe08 EFLAGS: 00010216 RAX: dffffc0000000000 RBX: ffff88804f2d0040 RCX: ffffffff81b95f1e RDX: 0000000000000005 RSI: 0000000000000008 RDI: 0000000000000028 RBP: ffff888016ece1c0 R08: 0000000000000000 R09: fffffbfff0cca14a R10: 0000000004000000 R11: 0000000000000000 R12: ffff888016ece200 R13: 0000000000000010 R14: ffff88801f3591a0 R15: 0000000000000000 FS: 000055555d0ba400(0000) GS:ffff8880e547a000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055557a136708 CR3: 0000000016952000 CR4: 0000000000350ef0 Oops: general protection fault, probably for non-canonical address 0xdffffc0000000005: 0000 [#2] SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000028-0x000000000000002f] CPU: 1 UID: 0 PID: 7117 Comm: syz-executor.7 Tainted: G B D 6.18.0-rc7-next-20251127 #1 PREEMPT(voluntary) Tainted: [B]=BAD_PAGE, [D]=DIE 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:ffff88804f2a7e08 EFLAGS: 00010216 RAX: dffffc0000000000 RBX: ffff88804f2d0dc0 RCX: ffffffff81b95f1e RDX: 0000000000000005 RSI: 0000000000000008 RDI: 0000000000000028 RBP: ffff888017ad36c0 R08: 0000000000000001 R09: ffffed1009e54fd4 R10: 0000000004000000 R11: 0000000000000000 R12: ffff888017ad3700 R13: 0000000000000010 R14: ffff88804e8c38f8 R15: 0000000000000000 FS: 000055555d0ba400(0000) GS:ffff8880e547a000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b2d52c000 CR3: 0000000007086000 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:0x7f58b382472b 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:00007ffc5ab2b1b0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: ffffffffffffffda RBX: 0000000000000009 RCX: 00007f58b382472b RDX: 00007f58b398a750 RSI: 00007f58b35e9270 RDI: 0000000000000008 RBP: 0000000000000001 R08: 0000000000000000 R09: 0000001b2d52bf4c R10: 0000000000000c8e R11: 0000000000000293 R12: 000000000002ca4a R13: 00000000000003e8 R14: 00007f58b3984f60 R15: 000000000002ca14 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:ffff88804d7efe08 EFLAGS: 00010216 RAX: dffffc0000000000 RBX: ffff88804f2d0040 RCX: ffffffff81b95f1e RDX: 0000000000000005 RSI: 0000000000000008 RDI: 0000000000000028 RBP: ffff888016ece1c0 R08: 0000000000000000 R09: fffffbfff0cca14a R10: 0000000004000000 R11: 0000000000000000 R12: ffff888016ece200 R13: 0000000000000010 R14: ffff88801f3591a0 R15: 0000000000000000 FS: 000055555d0ba400(0000) GS:ffff8880e547a000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b2d52c000 CR3: 0000000007086000 CR4: 0000000000350ef0 audit: type=1400 audit(1764232531.363:30): avc: denied { watch_reads } for pid=7146 comm="syz-executor.2" path="/syzkaller-testdir746253578/syzkaller.vnmQBf/145" dev="sda" ino=16039 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:unlabeled_t:s0 tclass=dir permissive=1 Oops: general protection fault, probably for non-canonical address 0xdffffc0000000005: 0000 [#3] SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000028-0x000000000000002f] CPU: 1 UID: 0 PID: 7155 Comm: syz-executor.7 Tainted: G B D 6.18.0-rc7-next-20251127 #1 PREEMPT(voluntary) Tainted: [B]=BAD_PAGE, [D]=DIE 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:ffff888051cb7e08 EFLAGS: 00010216 RAX: dffffc0000000000 RBX: ffff88804f2d0040 RCX: ffffffff81b955d0 RDX: 0000000000000005 RSI: ffffffff81b955e2 RDI: 0000000000000028 RBP: ffff8880162b3340 R08: 0000000000000001 R09: ffffed100a396fd4 R10: 0000000004000000 R11: 0000000000000000 R12: ffff8880162b3380 R13: 0000000000000010 R14: ffff88804d819028 R15: 0000000000000000 FS: 000055555d0ba400(0000) GS:ffff8880e547a000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b2d52b000 CR3: 0000000052370000 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:0x7f58b382472b 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:00007ffc5ab2b1b0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: ffffffffffffffda RBX: 0000000000000009 RCX: 00007f58b382472b RDX: 00007f58b398a750 RSI: 00007f58b35e9270 RDI: 0000000000000008 RBP: 0000000000000001 R08: 0000000000000000 R09: 0000001b2d52bd70 R10: 0000000000000c8e R11: 0000000000000293 R12: 000000000002d667 R13: 00000000000003e8 R14: 00007f58b3984f60 R15: 000000000002d64b 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:ffff88804d7efe08 EFLAGS: 00010216 RAX: dffffc0000000000 RBX: ffff88804f2d0040 RCX: ffffffff81b95f1e RDX: 0000000000000005 RSI: 0000000000000008 RDI: 0000000000000028 RBP: ffff888016ece1c0 R08: 0000000000000000 R09: fffffbfff0cca14a R10: 0000000004000000 R11: 0000000000000000 R12: ffff888016ece200 R13: 0000000000000010 R14: ffff88801f3591a0 R15: 0000000000000000 FS: 000055555d0ba400(0000) GS:ffff8880e547a000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b2d52b000 CR3: 0000000052370000 CR4: 0000000000350ef0 program syz-executor.2 is using a deprecated SCSI ioctl, please convert it to SG_IO Oops: general protection fault, probably for non-canonical address 0xdffffc0000000005: 0000 [#4] SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000028-0x000000000000002f] CPU: 0 UID: 0 PID: 7192 Comm: syz-executor.7 Tainted: G B D 6.18.0-rc7-next-20251127 #1 PREEMPT(voluntary) Tainted: [B]=BAD_PAGE, [D]=DIE 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:ffff888055d77e08 EFLAGS: 00010216 RAX: dffffc0000000000 RBX: ffff88804bcf1b40 RCX: ffffffff81b95f1e RDX: 0000000000000005 RSI: 0000000000000008 RDI: 0000000000000028 RBP: ffff88800e7f8540 R08: 0000000000000001 R09: ffffed100abaefd4 R10: 0000000004000000 R11: 0000000000000000 R12: ffff88800e7f8580 R13: 0000000000000010 R14: ffff88804d8848d0 R15: 0000000000000000 FS: 000055555d0ba400(0000) GS:ffff8880e537a000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f4b8e5ee3a4 CR3: 0000000052332000 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:0x7f58b382472b 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:00007ffc5ab2b1b0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: ffffffffffffffda RBX: 0000000000000009 RCX: 00007f58b382472b RDX: 00007f58b398a750 RSI: 00007f58b35e94a0 RDI: 0000000000000008 RBP: 0000000000000001 R08: 0000000000000000 R09: 0000001b2d52ca94 R10: 0000000000000c8e R11: 0000000000000293 R12: 000000000002e283 R13: 00000000000003e8 R14: 00007f58b3984f60 R15: 000000000002e246 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:ffff88804d7efe08 EFLAGS: 00010216 RAX: dffffc0000000000 RBX: ffff88804f2d0040 RCX: ffffffff81b95f1e RDX: 0000000000000005 RSI: 0000000000000008 RDI: 0000000000000028 RBP: ffff888016ece1c0 R08: 0000000000000000 R09: fffffbfff0cca14a R10: 0000000004000000 R11: 0000000000000000 R12: ffff888016ece200 R13: 0000000000000010 R14: ffff88801f3591a0 R15: 0000000000000000 FS: 000055555d0ba400(0000) GS:ffff8880e537a000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f4b8e5ee3a4 CR3: 0000000052332000 CR4: 0000000000350ef0 cgroup: fork rejected by pids controller in /syz4 ---------------- 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