================================================================== BUG: KASAN: slab-use-after-free in __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] BUG: KASAN: slab-use-after-free in _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154 Read of size 1 at addr ffff88807b6286d8 by task syz.1.223/7227 CPU: 0 UID: 0 PID: 7227 Comm: syz.1.223 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 __kasan_check_byte+0x2a/0x40 mm/kasan/common.c:573 kasan_check_byte include/linux/kasan.h:401 [inline] lock_acquire+0x84/0x340 kernel/locking/lockdep.c:5842 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:351 [inline] mqueue_flush_file+0x49/0x270 ipc/mqueue.c:663 filp_flush+0xbd/0x190 fs/open.c:1533 filp_close+0x1d/0x40 fs/open.c:1546 close_files fs/file.c:494 [inline] put_files_struct+0x1ba/0x350 fs/file.c:509 do_exit+0x67f/0x2310 kernel/exit.c:966 do_group_exit+0x21c/0x2d0 kernel/exit.c:1112 get_signal+0x1285/0x1340 kernel/signal.c:3034 arch_do_signal_or_restart+0x9a/0x7a0 arch/x86/kernel/signal.c:337 __exit_to_user_mode_loop kernel/entry/common.c:41 [inline] exit_to_user_mode_loop+0x87/0x4f0 kernel/entry/common.c:75 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline] syscall_exit_to_user_mode_work include/linux/entry-common.h:159 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:194 [inline] do_syscall_64+0x2e3/0xf80 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fe238f8f749 Code: Unable to access opcode bytes at 0x7fe238f8f71f. RSP: 002b:00007fe239d9e038 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: 00000000000000a0 RBX: 00007fe2391e6090 RCX: 00007fe238f8f749 RDX: 0000000000000000 RSI: 0000200000000000 RDI: 0000000000000003 RBP: 00007fe239013f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fe2391e6128 R14: 00007fe2391e6090 R15: 00007ffc5db7d7f8 Allocated by task 7226: kasan_save_stack mm/kasan/common.c:56 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:77 unpoison_slab_object mm/kasan/common.c:339 [inline] __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:365 kasan_slab_alloc include/linux/kasan.h:252 [inline] slab_post_alloc_hook mm/slub.c:4948 [inline] slab_alloc_node mm/slub.c:5258 [inline] kmem_cache_alloc_lru_noprof+0x36c/0x6e0 mm/slub.c:5277 mqueue_alloc_inode+0x28/0x40 ipc/mqueue.c:502 alloc_inode+0x6a/0x1b0 fs/inode.c:346 new_inode+0x22/0x170 fs/inode.c:1175 mqueue_get_inode+0x27/0xb50 ipc/mqueue.c:297 mqueue_create_attr+0x1ac/0x2e0 ipc/mqueue.c:590 vfs_mkobj+0xcf/0x290 fs/namei.c:4153 prepare_open ipc/mqueue.c:876 [inline] mqueue_file_open ipc/mqueue.c:905 [inline] do_mq_open+0x60d/0x7c0 ipc/mqueue.c:928 __do_sys_mq_open ipc/mqueue.c:941 [inline] __se_sys_mq_open ipc/mqueue.c:934 [inline] __x64_sys_mq_open+0x16a/0x1c0 ipc/mqueue.c:934 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 7220: kasan_save_stack mm/kasan/common.c:56 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:77 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:252 [inline] __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:284 kasan_slab_free include/linux/kasan.h:234 [inline] slab_free_hook mm/slub.c:2540 [inline] slab_free mm/slub.c:6663 [inline] kmem_cache_free+0x197/0x620 mm/slub.c:6774 rcu_do_batch kernel/rcu/tree.c:2605 [inline] rcu_core+0xd70/0x1870 kernel/rcu/tree.c:2857 handle_softirqs+0x27d/0x850 kernel/softirq.c:626 do_softirq+0xec/0x180 kernel/softirq.c:523 __local_bh_enable_ip+0x17d/0x1c0 kernel/softirq.c:450 lock_sock include/net/sock.h:1700 [inline] raw_destroy+0x17/0x30 net/ipv4/raw.c:694 sk_common_release+0x75/0x310 net/core/sock.c:3979 inet_release+0x144/0x190 net/ipv4/af_inet.c:437 __sock_release+0xb9/0x250 net/socket.c:657 sock_close+0x1c/0x30 net/socket.c:1461 __fput+0x44c/0xa70 fs/file_table.c:468 task_work_run+0x1d4/0x260 kernel/task_work.c:233 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] __exit_to_user_mode_loop kernel/entry/common.c:44 [inline] exit_to_user_mode_loop+0xff/0x4f0 kernel/entry/common.c:75 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline] syscall_exit_to_user_mode_work include/linux/entry-common.h:159 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:194 [inline] do_syscall_64+0x2e3/0xf80 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Last potentially related work creation: kasan_save_stack+0x3e/0x60 mm/kasan/common.c:56 kasan_record_aux_stack+0xbd/0xd0 mm/kasan/generic.c:556 __call_rcu_common kernel/rcu/tree.c:3119 [inline] call_rcu+0x157/0x9c0 kernel/rcu/tree.c:3239 destroy_inode fs/inode.c:401 [inline] evict+0x931/0xae0 fs/inode.c:861 __do_sys_mq_unlink ipc/mqueue.c:972 [inline] __se_sys_mq_unlink+0x2c5/0x360 ipc/mqueue.c:944 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88807b6286c0 which belongs to the cache mqueue_inode_cache of size 1576 The buggy address is located 24 bytes inside of freed 1576-byte region [ffff88807b6286c0, ffff88807b628ce8) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7b628 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff888029270501 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff888145ecbdc0 dead000000000122 0000000000000000 raw: 0000000000000000 0000000080120012 00000000f5000000 ffff888029270501 head: 00fff00000000040 ffff888145ecbdc0 dead000000000122 0000000000000000 head: 0000000000000000 0000000080120012 00000000f5000000 ffff888029270501 head: 00fff00000000003 ffffea0001ed8a01 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5833, tgid 5833 (syz-executor), ts 106559969950, free_ts 106541709245 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x234/0x290 mm/page_alloc.c:1846 prep_new_page mm/page_alloc.c:1854 [inline] get_page_from_freelist+0x2365/0x2440 mm/page_alloc.c:3915 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5210 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2486 alloc_slab_page mm/slub.c:3075 [inline] allocate_slab+0x86/0x3b0 mm/slub.c:3248 new_slab mm/slub.c:3302 [inline] ___slab_alloc+0xf2b/0x1960 mm/slub.c:4651 __slab_alloc+0x65/0x100 mm/slub.c:4774 __slab_alloc_node mm/slub.c:4850 [inline] slab_alloc_node mm/slub.c:5246 [inline] kmem_cache_alloc_lru_noprof+0x3fe/0x6e0 mm/slub.c:5277 mqueue_alloc_inode+0x28/0x40 ipc/mqueue.c:502 alloc_inode+0x6a/0x1b0 fs/inode.c:346 new_inode+0x22/0x170 fs/inode.c:1175 mqueue_get_inode ipc/mqueue.c:297 [inline] mqueue_fill_super+0xdc/0x380 ipc/mqueue.c:416 vfs_get_super fs/super.c:1324 [inline] get_tree_nodev+0xbb/0x150 fs/super.c:1343 vfs_get_tree+0x92/0x2a0 fs/super.c:1751 fc_mount fs/namespace.c:1209 [inline] fc_mount_longterm+0x1c/0x100 fs/namespace.c:1220 mq_create_mount ipc/mqueue.c:486 [inline] mq_init_ns+0x275/0x360 ipc/mqueue.c:1639 page last free pid 5811 tgid 5811 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0xbc8/0xd30 mm/page_alloc.c:2943 __folio_put+0x21b/0x2c0 mm/swap.c:112 put_netmem net/core/skbuff.c:7417 [inline] skb_page_unref include/linux/skbuff_ref.h:43 [inline] __skb_frag_unref include/linux/skbuff_ref.h:56 [inline] skb_release_data+0x49a/0x7c0 net/core/skbuff.c:1101 skb_release_all net/core/skbuff.c:1182 [inline] __napi_kfree_skb net/core/skbuff.c:1474 [inline] kfree_skb_napi_cache net/core/skbuff.c:7215 [inline] skb_attempt_defer_free+0x4e3/0x6d0 net/core/skbuff.c:7238 tcp_eat_recv_skb net/ipv4/tcp.c:1583 [inline] tcp_recvmsg_locked+0x2479/0x3670 net/ipv4/tcp.c:2883 tcp_recvmsg+0x210/0x810 net/ipv4/tcp.c:2929 inet_recvmsg+0x147/0x250 net/ipv4/af_inet.c:891 sock_recvmsg_nosec+0x11d/0x1c0 net/socket.c:1084 sock_recvmsg net/socket.c:1106 [inline] sock_read_iter+0x274/0x320 net/socket.c:1176 new_sync_read fs/read_write.c:491 [inline] vfs_read+0x55a/0xa30 fs/read_write.c:572 ksys_read+0x145/0x250 fs/read_write.c:715 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff88807b628580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88807b628600: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc >ffff88807b628680: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ^ ffff88807b628700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88807b628780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================