gfs2: fsid=syz:syz.0: can't create logd thread: -4 ================================================================== BUG: KASAN: slab-use-after-free in workqueue_sysfs_unregister kernel/workqueue.c:7372 [inline] BUG: KASAN: slab-use-after-free in destroy_workqueue+0xa7e/0xaa0 kernel/workqueue.c:5781 Read of size 8 at addr ffff888035bbd128 by task syz.3.2083/10112 CPU: 0 UID: 0 PID: 10112 Comm: syz.3.2083 Not tainted 6.11.0-syzkaller-02520-gadfc3ded5c33 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call Trace: __dump_stack lib/dump_stack.c:93 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:119 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc3/0x620 mm/kasan/report.c:488 kasan_report+0xd9/0x110 mm/kasan/report.c:601 workqueue_sysfs_unregister kernel/workqueue.c:7372 [inline] destroy_workqueue+0xa7e/0xaa0 kernel/workqueue.c:5781 gfs2_fill_super+0x146d/0x2d10 fs/gfs2/ops_fstype.c:1310 get_tree_bdev+0x372/0x610 fs/super.c:1635 gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1329 vfs_get_tree+0x92/0x380 fs/super.c:1800 do_new_mount fs/namespace.c:3507 [inline] path_mount+0x14e6/0x1f20 fs/namespace.c:3834 do_mount fs/namespace.c:3847 [inline] __do_sys_mount fs/namespace.c:4055 [inline] __se_sys_mount fs/namespace.c:4032 [inline] __x64_sys_mount+0x294/0x320 fs/namespace.c:4032 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fd73ad7f69a Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fd73bc63e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007fd73bc63ef0 RCX: 00007fd73ad7f69a RDX: 00000000200124c0 RSI: 0000000020012500 RDI: 00007fd73bc63eb0 RBP: 00000000200124c0 R08: 00007fd73bc63ef0 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000020012500 R13: 00007fd73bc63eb0 R14: 00000000000124ab R15: 0000000020012540 Allocated by task 10112: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:387 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slub.c:4159 [inline] __kmalloc_noprof+0x1e8/0x400 mm/slub.c:4171 kmalloc_noprof include/linux/slab.h:694 [inline] kzalloc_noprof include/linux/slab.h:816 [inline] alloc_workqueue+0x14a/0x1c50 kernel/workqueue.c:5649 gfs2_fill_super+0x1377/0x2d10 fs/gfs2/ops_fstype.c:1191 get_tree_bdev+0x372/0x610 fs/super.c:1635 gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1329 vfs_get_tree+0x92/0x380 fs/super.c:1800 do_new_mount fs/namespace.c:3507 [inline] path_mount+0x14e6/0x1f20 fs/namespace.c:3834 do_mount fs/namespace.c:3847 [inline] __do_sys_mount fs/namespace.c:4055 [inline] __se_sys_mount fs/namespace.c:4032 [inline] __x64_sys_mount+0x294/0x320 fs/namespace.c:4032 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 3: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:579 poison_slab_object+0xf7/0x160 mm/kasan/common.c:240 __kasan_slab_free+0x32/0x50 mm/kasan/common.c:256 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2250 [inline] slab_free mm/slub.c:4474 [inline] kfree+0x12a/0x3b0 mm/slub.c:4595 rcu_do_batch kernel/rcu/tree.c:2569 [inline] rcu_core+0x82b/0x16b0 kernel/rcu/tree.c:2843 handle_softirqs+0x219/0x8f0 kernel/softirq.c:554 __do_softirq kernel/softirq.c:588 [inline] invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu kernel/softirq.c:637 [inline] irq_exit_rcu+0xbb/0x120 kernel/softirq.c:649 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline] sysvec_apic_timer_interrupt+0x95/0xb0 arch/x86/kernel/apic/apic.c:1043 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 Last potentially related work creation: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 __kasan_record_aux_stack+0xba/0xd0 mm/kasan/generic.c:541 __call_rcu_common.constprop.0+0x9a/0x790 kernel/rcu/tree.c:3106 pwq_release_workfn+0x564/0xa00 kernel/workqueue.c:5078 kthread_worker_fn+0x308/0xb20 kernel/kthread.c:842 kthread+0x2c4/0x3a0 kernel/kthread.c:389 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 The buggy address belongs to the object at ffff888035bbd000 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 296 bytes inside of freed 512-byte region [ffff888035bbd000, ffff888035bbd200) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x35bbc head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xfdffffff(slab) raw: 00fff00000000040 ffff88801ac41c80 ffffea0000a5be00 dead000000000002 raw: 0000000000000000 0000000000100010 00000001fdffffff 0000000000000000 head: 00fff00000000040 ffff88801ac41c80 ffffea0000a5be00 dead000000000002 head: 0000000000000000 0000000000100010 00000001fdffffff 0000000000000000 head: 00fff00000000002 ffffea0000d6ef01 ffffffffffffffff 0000000000000000 head: 0000000000000004 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 8139, tgid 8139 (syz-executor), ts 385986101548, free_ts 385154556319 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1500 prep_new_page mm/page_alloc.c:1508 [inline] get_page_from_freelist+0x1351/0x2e50 mm/page_alloc.c:3446 __alloc_pages_noprof+0x22b/0x2460 mm/page_alloc.c:4702 __alloc_pages_node_noprof include/linux/gfp.h:269 [inline] alloc_pages_node_noprof include/linux/gfp.h:296 [inline] alloc_slab_page+0x4e/0xf0 mm/slub.c:2319 allocate_slab mm/slub.c:2482 [inline] new_slab+0x84/0x260 mm/slub.c:2535 ___slab_alloc+0xdac/0x1870 mm/slub.c:3721 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3811 __slab_alloc_node mm/slub.c:3864 [inline] slab_alloc_node mm/slub.c:4026 [inline] __kmalloc_cache_noprof+0x2b4/0x300 mm/slub.c:4185 kmalloc_noprof include/linux/slab.h:690 [inline] kzalloc_noprof include/linux/slab.h:816 [inline] rfkill_fop_open+0x56/0x750 net/rfkill/core.c:1168 misc_open+0x35d/0x420 drivers/char/misc.c:165 chrdev_open+0x23a/0x6a0 fs/char_dev.c:414 do_dentry_open+0x6cd/0x1530 fs/open.c:958 vfs_open+0x82/0x3f0 fs/open.c:1088 do_open fs/namei.c:3774 [inline] path_openat+0x1e6a/0x2d60 fs/namei.c:3933 do_filp_open+0x1dc/0x430 fs/namei.c:3960 do_sys_openat2+0x17a/0x1e0 fs/open.c:1415 page last free pid 5392 tgid 5392 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1101 [inline] free_unref_page+0x64a/0xe40 mm/page_alloc.c:2619 kasan_depopulate_vmalloc_pte+0x63/0x80 mm/kasan/shadow.c:408 apply_to_pte_range mm/memory.c:2814 [inline] apply_to_pmd_range mm/memory.c:2858 [inline] apply_to_pud_range mm/memory.c:2894 [inline] apply_to_p4d_range mm/memory.c:2930 [inline] __apply_to_page_range+0x798/0xdd0 mm/memory.c:2964 kasan_release_vmalloc+0xac/0xc0 mm/kasan/shadow.c:525 purge_vmap_node+0x3ec/0x920 mm/vmalloc.c:2209 process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3231 process_scheduled_works kernel/workqueue.c:3312 [inline] worker_thread+0x6c8/0xf00 kernel/workqueue.c:3393 kthread+0x2c4/0x3a0 kernel/kthread.c:389 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Memory state around the buggy address: ffff888035bbd000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888035bbd080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888035bbd100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888035bbd180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888035bbd200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== ================================================================== BUG: KASAN: slab-use-after-free in __mutex_lock_common kernel/locking/mutex.c:587 [inline] BUG: KASAN: slab-use-after-free in __mutex_lock+0x79e/0x9c0 kernel/locking/mutex.c:752 Read of size 8 at addr ffff888035bbd080 by task syz.3.2083/10112 CPU: 1 UID: 0 PID: 10112 Comm: syz.3.2083 Tainted: G B 6.11.0-syzkaller-02520-gadfc3ded5c33 #0 Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call Trace: __dump_stack lib/dump_stack.c:93 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:119 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc3/0x620 mm/kasan/report.c:488 kasan_report+0xd9/0x110 mm/kasan/report.c:601 __mutex_lock_common kernel/locking/mutex.c:587 [inline] __mutex_lock+0x79e/0x9c0 kernel/locking/mutex.c:752 destroy_workqueue+0x78/0xaa0 kernel/workqueue.c:5784 gfs2_fill_super+0x146d/0x2d10 fs/gfs2/ops_fstype.c:1310 get_tree_bdev+0x372/0x610 fs/super.c:1635 gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1329 vfs_get_tree+0x92/0x380 fs/super.c:1800 do_new_mount fs/namespace.c:3507 [inline] path_mount+0x14e6/0x1f20 fs/namespace.c:3834 do_mount fs/namespace.c:3847 [inline] __do_sys_mount fs/namespace.c:4055 [inline] __se_sys_mount fs/namespace.c:4032 [inline] __x64_sys_mount+0x294/0x320 fs/namespace.c:4032 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fd73ad7f69a Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fd73bc63e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007fd73bc63ef0 RCX: 00007fd73ad7f69a RDX: 00000000200124c0 RSI: 0000000020012500 RDI: 00007fd73bc63eb0 RBP: 00000000200124c0 R08: 00007fd73bc63ef0 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000020012500 R13: 00007fd73bc63eb0 R14: 00000000000124ab R15: 0000000020012540 Allocated by task 10112: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:387 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slub.c:4159 [inline] __kmalloc_noprof+0x1e8/0x400 mm/slub.c:4171 kmalloc_noprof include/linux/slab.h:694 [inline] kzalloc_noprof include/linux/slab.h:816 [inline] alloc_workqueue+0x14a/0x1c50 kernel/workqueue.c:5649 gfs2_fill_super+0x1377/0x2d10 fs/gfs2/ops_fstype.c:1191 get_tree_bdev+0x372/0x610 fs/super.c:1635 gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1329 vfs_get_tree+0x92/0x380 fs/super.c:1800 do_new_mount fs/namespace.c:3507 [inline] path_mount+0x14e6/0x1f20 fs/namespace.c:3834 do_mount fs/namespace.c:3847 [inline] __do_sys_mount fs/namespace.c:4055 [inline] __se_sys_mount fs/namespace.c:4032 [inline] __x64_sys_mount+0x294/0x320 fs/namespace.c:4032 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 3: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:579 poison_slab_object+0xf7/0x160 mm/kasan/common.c:240 __kasan_slab_free+0x32/0x50 mm/kasan/common.c:256 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2250 [inline] slab_free mm/slub.c:4474 [inline] kfree+0x12a/0x3b0 mm/slub.c:4595 rcu_do_batch kernel/rcu/tree.c:2569 [inline] rcu_core+0x82b/0x16b0 kernel/rcu/tree.c:2843 handle_softirqs+0x219/0x8f0 kernel/softirq.c:554 __do_softirq kernel/softirq.c:588 [inline] invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu kernel/softirq.c:637 [inline] irq_exit_rcu+0xbb/0x120 kernel/softirq.c:649 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline] sysvec_apic_timer_interrupt+0x95/0xb0 arch/x86/kernel/apic/apic.c:1043 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 Last potentially related work creation: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 __kasan_record_aux_stack+0xba/0xd0 mm/kasan/generic.c:541 __call_rcu_common.constprop.0+0x9a/0x790 kernel/rcu/tree.c:3106 pwq_release_workfn+0x564/0xa00 kernel/workqueue.c:5078 kthread_worker_fn+0x308/0xb20 kernel/kthread.c:842 kthread+0x2c4/0x3a0 kernel/kthread.c:389 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 The buggy address belongs to the object at ffff888035bbd000 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 128 bytes inside of freed 512-byte region [ffff888035bbd000, ffff888035bbd200) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888035bbfc00 pfn:0x35bbc head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000240(workingset|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xfdffffff(slab) raw: 00fff00000000240 ffff88801ac41c80 ffffea0000a56910 ffffea0000c3c810 raw: ffff888035bbfc00 000000000010000d 00000001fdffffff 0000000000000000 head: 00fff00000000240 ffff88801ac41c80 ffffea0000a56910 ffffea0000c3c810 head: ffff888035bbfc00 000000000010000d 00000001fdffffff 0000000000000000 head: 00fff00000000002 ffffea0000d6ef01 ffffffffffffffff 0000000000000000 head: 0000000000000004 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 8139, tgid 8139 (syz-executor), ts 385986101548, free_ts 385154556319 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1500 prep_new_page mm/page_alloc.c:1508 [inline] get_page_from_freelist+0x1351/0x2e50 mm/page_alloc.c:3446 __alloc_pages_noprof+0x22b/0x2460 mm/page_alloc.c:4702 __alloc_pages_node_noprof include/linux/gfp.h:269 [inline] alloc_pages_node_noprof include/linux/gfp.h:296 [inline] alloc_slab_page+0x4e/0xf0 mm/slub.c:2319 allocate_slab mm/slub.c:2482 [inline] new_slab+0x84/0x260 mm/slub.c:2535 ___slab_alloc+0xdac/0x1870 mm/slub.c:3721 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3811 __slab_alloc_node mm/slub.c:3864 [inline] slab_alloc_node mm/slub.c:4026 [inline] __kmalloc_cache_noprof+0x2b4/0x300 mm/slub.c:4185 kmalloc_noprof include/linux/slab.h:690 [inline] kzalloc_noprof include/linux/slab.h:816 [inline] rfkill_fop_open+0x56/0x750 net/rfkill/core.c:1168 misc_open+0x35d/0x420 drivers/char/misc.c:165 chrdev_open+0x23a/0x6a0 fs/char_dev.c:414 do_dentry_open+0x6cd/0x1530 fs/open.c:958 vfs_open+0x82/0x3f0 fs/open.c:1088 do_open fs/namei.c:3774 [inline] path_openat+0x1e6a/0x2d60 fs/namei.c:3933 do_filp_open+0x1dc/0x430 fs/namei.c:3960 do_sys_openat2+0x17a/0x1e0 fs/open.c:1415 page last free pid 5392 tgid 5392 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1101 [inline] free_unref_page+0x64a/0xe40 mm/page_alloc.c:2619 kasan_depopulate_vmalloc_pte+0x63/0x80 mm/kasan/shadow.c:408 apply_to_pte_range mm/memory.c:2814 [inline] apply_to_pmd_range mm/memory.c:2858 [inline] apply_to_pud_range mm/memory.c:2894 [inline] apply_to_p4d_range mm/memory.c:2930 [inline] __apply_to_page_range+0x798/0xdd0 mm/memory.c:2964 kasan_release_vmalloc+0xac/0xc0 mm/kasan/shadow.c:525 purge_vmap_node+0x3ec/0x920 mm/vmalloc.c:2209 process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3231 process_scheduled_works kernel/workqueue.c:3312 [inline] worker_thread+0x6c8/0xf00 kernel/workqueue.c:3393 kthread+0x2c4/0x3a0 kernel/kthread.c:389 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Memory state around the buggy address: ffff888035bbcf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888035bbd000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888035bbd080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888035bbd100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888035bbd180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ================================================================== BUG: KASAN: slab-use-after-free in instrument_atomic_read include/linux/instrumented.h:68 [inline] BUG: KASAN: slab-use-after-free in atomic_long_read include/linux/atomic/atomic-instrumented.h:3188 [inline] BUG: KASAN: slab-use-after-free in __mutex_trylock_common+0x78/0x250 kernel/locking/mutex.c:107 Read of size 8 at addr ffff888035bbd020 by task syz.3.2083/10112 CPU: 1 UID: 0 PID: 10112 Comm: syz.3.2083 Tainted: G B 6.11.0-syzkaller-02520-gadfc3ded5c33 #0 Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call Trace: __dump_stack lib/dump_stack.c:93 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:119 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc3/0x620 mm/kasan/report.c:488 kasan_report+0xd9/0x110 mm/kasan/report.c:601 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0xef/0x1a0 mm/kasan/generic.c:189 instrument_atomic_read include/linux/instrumented.h:68 [inline] atomic_long_read include/linux/atomic/atomic-instrumented.h:3188 [inline] __mutex_trylock_common+0x78/0x250 kernel/locking/mutex.c:107 __mutex_trylock kernel/locking/mutex.c:152 [inline] __mutex_lock_common kernel/locking/mutex.c:611 [inline] __mutex_lock+0x18c/0x9c0 kernel/locking/mutex.c:752 destroy_workqueue+0x78/0xaa0 kernel/workqueue.c:5784 gfs2_fill_super+0x146d/0x2d10 fs/gfs2/ops_fstype.c:1310 get_tree_bdev+0x372/0x610 fs/super.c:1635 gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1329 vfs_get_tree+0x92/0x380 fs/super.c:1800 do_new_mount fs/namespace.c:3507 [inline] path_mount+0x14e6/0x1f20 fs/namespace.c:3834 do_mount fs/namespace.c:3847 [inline] __do_sys_mount fs/namespace.c:4055 [inline] __se_sys_mount fs/namespace.c:4032 [inline] __x64_sys_mount+0x294/0x320 fs/namespace.c:4032 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fd73ad7f69a Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fd73bc63e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007fd73bc63ef0 RCX: 00007fd73ad7f69a RDX: 00000000200124c0 RSI: 0000000020012500 RDI: 00007fd73bc63eb0 RBP: 00000000200124c0 R08: 00007fd73bc63ef0 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000020012500 R13: 00007fd73bc63eb0 R14: 00000000000124ab R15: 0000000020012540 Allocated by task 10112: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:387 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slub.c:4159 [inline] __kmalloc_noprof+0x1e8/0x400 mm/slub.c:4171 kmalloc_noprof include/linux/slab.h:694 [inline] kzalloc_noprof include/linux/slab.h:816 [inline] alloc_workqueue+0x14a/0x1c50 kernel/workqueue.c:5649 gfs2_fill_super+0x1377/0x2d10 fs/gfs2/ops_fstype.c:1191 get_tree_bdev+0x372/0x610 fs/super.c:1635 gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1329 vfs_get_tree+0x92/0x380 fs/super.c:1800 do_new_mount fs/namespace.c:3507 [inline] path_mount+0x14e6/0x1f20 fs/namespace.c:3834 do_mount fs/namespace.c:3847 [inline] __do_sys_mount fs/namespace.c:4055 [inline] __se_sys_mount fs/namespace.c:4032 [inline] __x64_sys_mount+0x294/0x320 fs/namespace.c:4032 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 3: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:579 poison_slab_object+0xf7/0x160 mm/kasan/common.c:240 __kasan_slab_free+0x32/0x50 mm/kasan/common.c:256 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2250 [inline] slab_free mm/slub.c:4474 [inline] kfree+0x12a/0x3b0 mm/slub.c:4595 rcu_do_batch kernel/rcu/tree.c:2569 [inline] rcu_core+0x82b/0x16b0 kernel/rcu/tree.c:2843 handle_softirqs+0x219/0x8f0 kernel/softirq.c:554 __do_softirq kernel/softirq.c:588 [inline] invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu kernel/softirq.c:637 [inline] irq_exit_rcu+0xbb/0x120 kernel/softirq.c:649 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline] sysvec_apic_timer_interrupt+0x95/0xb0 arch/x86/kernel/apic/apic.c:1043 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 Last potentially related work creation: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 __kasan_record_aux_stack+0xba/0xd0 mm/kasan/generic.c:541 __call_rcu_common.constprop.0+0x9a/0x790 kernel/rcu/tree.c:3106 pwq_release_workfn+0x564/0xa00 kernel/workqueue.c:5078 kthread_worker_fn+0x308/0xb20 kernel/kthread.c:842 kthread+0x2c4/0x3a0 kernel/kthread.c:389 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 The buggy address belongs to the object at ffff888035bbd000 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 32 bytes inside of freed 512-byte region [ffff888035bbd000, ffff888035bbd200) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888035bbfc00 pfn:0x35bbc head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000240(workingset|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xfdffffff(slab) raw: 00fff00000000240 ffff88801ac41c80 ffffea0000a56910 ffffea0000c3c810 raw: ffff888035bbfc00 000000000010000d 00000001fdffffff 0000000000000000 head: 00fff00000000240 ffff88801ac41c80 ffffea0000a56910 ffffea0000c3c810 head: ffff888035bbfc00 000000000010000d 00000001fdffffff 0000000000000000 head: 00fff00000000002 ffffea0000d6ef01 ffffffffffffffff 0000000000000000 head: 0000000000000004 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 8139, tgid 8139 (syz-executor), ts 385986101548, free_ts 385154556319 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1500 prep_new_page mm/page_alloc.c:1508 [inline] get_page_from_freelist+0x1351/0x2e50 mm/page_alloc.c:3446 __alloc_pages_noprof+0x22b/0x2460 mm/page_alloc.c:4702 __alloc_pages_node_noprof include/linux/gfp.h:269 [inline] alloc_pages_node_noprof include/linux/gfp.h:296 [inline] alloc_slab_page+0x4e/0xf0 mm/slub.c:2319 allocate_slab mm/slub.c:2482 [inline] new_slab+0x84/0x260 mm/slub.c:2535 ___slab_alloc+0xdac/0x1870 mm/slub.c:3721 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3811 __slab_alloc_node mm/slub.c:3864 [inline] slab_alloc_node mm/slub.c:4026 [inline] __kmalloc_cache_noprof+0x2b4/0x300 mm/slub.c:4185 kmalloc_noprof include/linux/slab.h:690 [inline] kzalloc_noprof include/linux/slab.h:816 [inline] rfkill_fop_open+0x56/0x750 net/rfkill/core.c:1168 misc_open+0x35d/0x420 drivers/char/misc.c:165 chrdev_open+0x23a/0x6a0 fs/char_dev.c:414 do_dentry_open+0x6cd/0x1530 fs/open.c:958 vfs_open+0x82/0x3f0 fs/open.c:1088 do_open fs/namei.c:3774 [inline] path_openat+0x1e6a/0x2d60 fs/namei.c:3933 do_filp_open+0x1dc/0x430 fs/namei.c:3960 do_sys_openat2+0x17a/0x1e0 fs/open.c:1415 page last free pid 5392 tgid 5392 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1101 [inline] free_unref_page+0x64a/0xe40 mm/page_alloc.c:2619 kasan_depopulate_vmalloc_pte+0x63/0x80 mm/kasan/shadow.c:408 apply_to_pte_range mm/memory.c:2814 [inline] apply_to_pmd_range mm/memory.c:2858 [inline] apply_to_pud_range mm/memory.c:2894 [inline] apply_to_p4d_range mm/memory.c:2930 [inline] __apply_to_page_range+0x798/0xdd0 mm/memory.c:2964 kasan_release_vmalloc+0xac/0xc0 mm/kasan/shadow.c:525 purge_vmap_node+0x3ec/0x920 mm/vmalloc.c:2209 process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3231 process_scheduled_works kernel/workqueue.c:3312 [inline] worker_thread+0x6c8/0xf00 kernel/workqueue.c:3393 kthread+0x2c4/0x3a0 kernel/kthread.c:389 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Memory state around the buggy address: ffff888035bbcf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888035bbcf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888035bbd000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888035bbd080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888035bbd100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ================================================================== BUG: KASAN: slab-use-after-free in arch_atomic64_read arch/x86/include/asm/atomic64_64.h:15 [inline] BUG: KASAN: slab-use-after-free in raw_atomic64_read include/linux/atomic/atomic-arch-fallback.h:2583 [inline] BUG: KASAN: slab-use-after-free in raw_atomic_long_read include/linux/atomic/atomic-long.h:38 [inline] BUG: KASAN: slab-use-after-free in atomic_long_read include/linux/atomic/atomic-instrumented.h:3189 [inline] BUG: KASAN: slab-use-after-free in __mutex_trylock_common+0x231/0x250 kernel/locking/mutex.c:107 Read of size 8 at addr ffff888035bbd020 by task syz.3.2083/10112 CPU: 1 UID: 0 PID: 10112 Comm: syz.3.2083 Tainted: G B 6.11.0-syzkaller-02520-gadfc3ded5c33 #0 Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call Trace: __dump_stack lib/dump_stack.c:93 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:119 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc3/0x620 mm/kasan/report.c:488 kasan_report+0xd9/0x110 mm/kasan/report.c:601 arch_atomic64_read arch/x86/include/asm/atomic64_64.h:15 [inline] raw_atomic64_read include/linux/atomic/atomic-arch-fallback.h:2583 [inline] raw_atomic_long_read include/linux/atomic/atomic-long.h:38 [inline] atomic_long_read include/linux/atomic/atomic-instrumented.h:3189 [inline] __mutex_trylock_common+0x231/0x250 kernel/locking/mutex.c:107 __mutex_trylock kernel/locking/mutex.c:152 [inline] __mutex_lock_common kernel/locking/mutex.c:611 [inline] __mutex_lock+0x18c/0x9c0 kernel/locking/mutex.c:752 destroy_workqueue+0x78/0xaa0 kernel/workqueue.c:5784 gfs2_fill_super+0x146d/0x2d10 fs/gfs2/ops_fstype.c:1310 get_tree_bdev+0x372/0x610 fs/super.c:1635 gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1329 vfs_get_tree+0x92/0x380 fs/super.c:1800 do_new_mount fs/namespace.c:3507 [inline] path_mount+0x14e6/0x1f20 fs/namespace.c:3834 do_mount fs/namespace.c:3847 [inline] __do_sys_mount fs/namespace.c:4055 [inline] __se_sys_mount fs/namespace.c:4032 [inline] __x64_sys_mount+0x294/0x320 fs/namespace.c:4032 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fd73ad7f69a Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fd73bc63e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007fd73bc63ef0 RCX: 00007fd73ad7f69a RDX: 00000000200124c0 RSI: 0000000020012500 RDI: 00007fd73bc63eb0 RBP: 00000000200124c0 R08: 00007fd73bc63ef0 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000020012500 R13: 00007fd73bc63eb0 R14: 00000000000124ab R15: 0000000020012540 Allocated by task 10112: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:387 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slub.c:4159 [inline] __kmalloc_noprof+0x1e8/0x400 mm/slub.c:4171 kmalloc_noprof include/linux/slab.h:694 [inline] kzalloc_noprof include/linux/slab.h:816 [inline] alloc_workqueue+0x14a/0x1c50 kernel/workqueue.c:5649 gfs2_fill_super+0x1377/0x2d10 fs/gfs2/ops_fstype.c:1191 get_tree_bdev+0x372/0x610 fs/super.c:1635 gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1329 vfs_get_tree+0x92/0x380 fs/super.c:1800 do_new_mount fs/namespace.c:3507 [inline] path_mount+0x14e6/0x1f20 fs/namespace.c:3834 do_mount fs/namespace.c:3847 [inline] __do_sys_mount fs/namespace.c:4055 [inline] __se_sys_mount fs/namespace.c:4032 [inline] __x64_sys_mount+0x294/0x320 fs/namespace.c:4032 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 3: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:579 poison_slab_object+0xf7/0x160 mm/kasan/common.c:240 __kasan_slab_free+0x32/0x50 mm/kasan/common.c:256 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2250 [inline] slab_free mm/slub.c:4474 [inline] kfree+0x12a/0x3b0 mm/slub.c:4595 rcu_do_batch kernel/rcu/tree.c:2569 [inline] rcu_core+0x82b/0x16b0 kernel/rcu/tree.c:2843 handle_softirqs+0x219/0x8f0 kernel/softirq.c:554 __do_softirq kernel/softirq.c:588 [inline] invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu kernel/softirq.c:637 [inline] irq_exit_rcu+0xbb/0x120 kernel/softirq.c:649 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline] sysvec_apic_timer_interrupt+0x95/0xb0 arch/x86/kernel/apic/apic.c:1043 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 Last potentially related work creation: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 __kasan_record_aux_stack+0xba/0xd0 mm/kasan/generic.c:541 __call_rcu_common.constprop.0+0x9a/0x790 kernel/rcu/tree.c:3106 pwq_release_workfn+0x564/0xa00 kernel/workqueue.c:5078 kthread_worker_fn+0x308/0xb20 kernel/kthread.c:842 kthread+0x2c4/0x3a0 kernel/kthread.c:389 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 The buggy address belongs to the object at ffff888035bbd000 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 32 bytes inside of freed 512-byte region [ffff888035bbd000, ffff888035bbd200) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888035bbfc00 pfn:0x35bbc head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000240(workingset|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xfdffffff(slab) raw: 00fff00000000240 ffff88801ac41c80 ffffea0000a56910 ffffea0000c3c810 raw: ffff888035bbfc00 000000000010000d 00000001fdffffff 0000000000000000 head: 00fff00000000240 ffff88801ac41c80 ffffea0000a56910 ffffea0000c3c810 head: ffff888035bbfc00 000000000010000d 00000001fdffffff 0000000000000000 head: 00fff00000000002 ffffea0000d6ef01 ffffffffffffffff 0000000000000000 head: 0000000000000004 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 8139, tgid 8139 (syz-executor), ts 385986101548, free_ts 385154556319 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1500 prep_new_page mm/page_alloc.c:1508 [inline] get_page_from_freelist+0x1351/0x2e50 mm/page_alloc.c:3446 __alloc_pages_noprof+0x22b/0x2460 mm/page_alloc.c:4702 __alloc_pages_node_noprof include/linux/gfp.h:269 [inline] alloc_pages_node_noprof include/linux/gfp.h:296 [inline] alloc_slab_page+0x4e/0xf0 mm/slub.c:2319 allocate_slab mm/slub.c:2482 [inline] new_slab+0x84/0x260 mm/slub.c:2535 ___slab_alloc+0xdac/0x1870 mm/slub.c:3721 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3811 __slab_alloc_node mm/slub.c:3864 [inline] slab_alloc_node mm/slub.c:4026 [inline] __kmalloc_cache_noprof+0x2b4/0x300 mm/slub.c:4185 kmalloc_noprof include/linux/slab.h:690 [inline] kzalloc_noprof include/linux/slab.h:816 [inline] rfkill_fop_open+0x56/0x750 net/rfkill/core.c:1168 misc_open+0x35d/0x420 drivers/char/misc.c:165 chrdev_open+0x23a/0x6a0 fs/char_dev.c:414 do_dentry_open+0x6cd/0x1530 fs/open.c:958 vfs_open+0x82/0x3f0 fs/open.c:1088 do_open fs/namei.c:3774 [inline] path_openat+0x1e6a/0x2d60 fs/namei.c:3933 do_filp_open+0x1dc/0x430 fs/namei.c:3960 do_sys_openat2+0x17a/0x1e0 fs/open.c:1415 page last free pid 5392 tgid 5392 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1101 [inline] free_unref_page+0x64a/0xe40 mm/page_alloc.c:2619 kasan_depopulate_vmalloc_pte+0x63/0x80 mm/kasan/shadow.c:408 apply_to_pte_range mm/memory.c:2814 [inline] apply_to_pmd_range mm/memory.c:2858 [inline] apply_to_pud_range mm/memory.c:2894 [inline] apply_to_p4d_range mm/memory.c:2930 [inline] __apply_to_page_range+0x798/0xdd0 mm/memory.c:2964 kasan_release_vmalloc+0xac/0xc0 mm/kasan/shadow.c:525 purge_vmap_node+0x3ec/0x920 mm/vmalloc.c:2209 process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3231 process_scheduled_works kernel/workqueue.c:3312 [inline] worker_thread+0x6c8/0xf00 kernel/workqueue.c:3393 kthread+0x2c4/0x3a0 kernel/kthread.c:389 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Memory state around the buggy address: ffff888035bbcf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888035bbcf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888035bbd000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888035bbd080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888035bbd100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ================================================================== BUG: KASAN: slab-use-after-free in instrument_atomic_read_write include/linux/instrumented.h:96 [inline] BUG: KASAN: slab-use-after-free in atomic_long_try_cmpxchg_acquire include/linux/atomic/atomic-instrumented.h:4456 [inline] BUG: KASAN: slab-use-after-free in __mutex_trylock_common+0xdd/0x250 kernel/locking/mutex.c:129 Write of size 8 at addr ffff888035bbd020 by task syz.3.2083/10112 CPU: 1 UID: 0 PID: 10112 Comm: syz.3.2083 Tainted: G B 6.11.0-syzkaller-02520-gadfc3ded5c33 #0 Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call Trace: __dump_stack lib/dump_stack.c:93 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:119 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc3/0x620 mm/kasan/report.c:488 kasan_report+0xd9/0x110 mm/kasan/report.c:601 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0xef/0x1a0 mm/kasan/generic.c:189 instrument_atomic_read_write include/linux/instrumented.h:96 [inline] atomic_long_try_cmpxchg_acquire include/linux/atomic/atomic-instrumented.h:4456 [inline] __mutex_trylock_common+0xdd/0x250 kernel/locking/mutex.c:129 __mutex_trylock kernel/locking/mutex.c:152 [inline] __mutex_lock_common kernel/locking/mutex.c:611 [inline] __mutex_lock+0x18c/0x9c0 kernel/locking/mutex.c:752 destroy_workqueue+0x78/0xaa0 kernel/workqueue.c:5784 gfs2_fill_super+0x146d/0x2d10 fs/gfs2/ops_fstype.c:1310 get_tree_bdev+0x372/0x610 fs/super.c:1635 gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1329 vfs_get_tree+0x92/0x380 fs/super.c:1800 do_new_mount fs/namespace.c:3507 [inline] path_mount+0x14e6/0x1f20 fs/namespace.c:3834 do_mount fs/namespace.c:3847 [inline] __do_sys_mount fs/namespace.c:4055 [inline] __se_sys_mount fs/namespace.c:4032 [inline] __x64_sys_mount+0x294/0x320 fs/namespace.c:4032 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fd73ad7f69a Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fd73bc63e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007fd73bc63ef0 RCX: 00007fd73ad7f69a RDX: 00000000200124c0 RSI: 0000000020012500 RDI: 00007fd73bc63eb0 RBP: 00000000200124c0 R08: 00007fd73bc63ef0 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000020012500 R13: 00007fd73bc63eb0 R14: 00000000000124ab R15: 0000000020012540 Allocated by task 10112: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:387 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slub.c:4159 [inline] __kmalloc_noprof+0x1e8/0x400 mm/slub.c:4171 kmalloc_noprof include/linux/slab.h:694 [inline] kzalloc_noprof include/linux/slab.h:816 [inline] alloc_workqueue+0x14a/0x1c50 kernel/workqueue.c:5649 gfs2_fill_super+0x1377/0x2d10 fs/gfs2/ops_fstype.c:1191 get_tree_bdev+0x372/0x610 fs/super.c:1635 gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1329 vfs_get_tree+0x92/0x380 fs/super.c:1800 do_new_mount fs/namespace.c:3507 [inline] path_mount+0x14e6/0x1f20 fs/namespace.c:3834 do_mount fs/namespace.c:3847 [inline] __do_sys_mount fs/namespace.c:4055 [inline] __se_sys_mount fs/namespace.c:4032 [inline] __x64_sys_mount+0x294/0x320 fs/namespace.c:4032 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 3: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:579 poison_slab_object+0xf7/0x160 mm/kasan/common.c:240 __kasan_slab_free+0x32/0x50 mm/kasan/common.c:256 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2250 [inline] slab_free mm/slub.c:4474 [inline] kfree+0x12a/0x3b0 mm/slub.c:4595 rcu_do_batch kernel/rcu/tree.c:2569 [inline] rcu_core+0x82b/0x16b0 kernel/rcu/tree.c:2843 handle_softirqs+0x219/0x8f0 kernel/softirq.c:554 __do_softirq kernel/softirq.c:588 [inline] invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu kernel/softirq.c:637 [inline] irq_exit_rcu+0xbb/0x120 kernel/softirq.c:649 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline] sysvec_apic_timer_interrupt+0x95/0xb0 arch/x86/kernel/apic/apic.c:1043 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 Last potentially related work creation: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 __kasan_record_aux_stack+0xba/0xd0 mm/kasan/generic.c:541 __call_rcu_common.constprop.0+0x9a/0x790 kernel/rcu/tree.c:3106 pwq_release_workfn+0x564/0xa00 kernel/workqueue.c:5078 kthread_worker_fn+0x308/0xb20 kernel/kthread.c:842 kthread+0x2c4/0x3a0 kernel/kthread.c:389 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 The buggy address belongs to the object at ffff888035bbd000 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 32 bytes inside of freed 512-byte region [ffff888035bbd000, ffff888035bbd200) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888035bbfc00 pfn:0x35bbc head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000240(workingset|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xfdffffff(slab) raw: 00fff00000000240 ffff88801ac41c80 ffffea0000a56910 ffffea0000c3c810 raw: ffff888035bbfc00 000000000010000d 00000001fdffffff 0000000000000000 head: 00fff00000000240 ffff88801ac41c80 ffffea0000a56910 ffffea0000c3c810 head: ffff888035bbfc00 000000000010000d 00000001fdffffff 0000000000000000 head: 00fff00000000002 ffffea0000d6ef01 ffffffffffffffff 0000000000000000 head: 0000000000000004 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 8139, tgid 8139 (syz-executor), ts 385986101548, free_ts 385154556319 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1500 prep_new_page mm/page_alloc.c:1508 [inline] get_page_from_freelist+0x1351/0x2e50 mm/page_alloc.c:3446 __alloc_pages_noprof+0x22b/0x2460 mm/page_alloc.c:4702 __alloc_pages_node_noprof include/linux/gfp.h:269 [inline] alloc_pages_node_noprof include/linux/gfp.h:296 [inline] alloc_slab_page+0x4e/0xf0 mm/slub.c:2319 allocate_slab mm/slub.c:2482 [inline] new_slab+0x84/0x260 mm/slub.c:2535 ___slab_alloc+0xdac/0x1870 mm/slub.c:3721 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3811 __slab_alloc_node mm/slub.c:3864 [inline] slab_alloc_node mm/slub.c:4026 [inline] __kmalloc_cache_noprof+0x2b4/0x300 mm/slub.c:4185 kmalloc_noprof include/linux/slab.h:690 [inline] kzalloc_noprof include/linux/slab.h:816 [inline] rfkill_fop_open+0x56/0x750 net/rfkill/core.c:1168 misc_open+0x35d/0x420 drivers/char/misc.c:165 chrdev_open+0x23a/0x6a0 fs/char_dev.c:414 do_dentry_open+0x6cd/0x1530 fs/open.c:958 vfs_open+0x82/0x3f0 fs/open.c:1088 do_open fs/namei.c:3774 [inline] path_openat+0x1e6a/0x2d60 fs/namei.c:3933 do_filp_open+0x1dc/0x430 fs/namei.c:3960 do_sys_openat2+0x17a/0x1e0 fs/open.c:1415 page last free pid 5392 tgid 5392 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1101 [inline] free_unref_page+0x64a/0xe40 mm/page_alloc.c:2619 kasan_depopulate_vmalloc_pte+0x63/0x80 mm/kasan/shadow.c:408 apply_to_pte_range mm/memory.c:2814 [inline] apply_to_pmd_range mm/memory.c:2858 [inline] apply_to_pud_range mm/memory.c:2894 [inline] apply_to_p4d_range mm/memory.c:2930 [inline] __apply_to_page_range+0x798/0xdd0 mm/memory.c:2964 kasan_release_vmalloc+0xac/0xc0 mm/kasan/shadow.c:525 purge_vmap_node+0x3ec/0x920 mm/vmalloc.c:2209 process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3231 process_scheduled_works kernel/workqueue.c:3312 [inline] worker_thread+0x6c8/0xf00 kernel/workqueue.c:3393 kthread+0x2c4/0x3a0 kernel/kthread.c:389 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Memory state around the buggy address: ffff888035bbcf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888035bbcf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888035bbd000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888035bbd080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888035bbd100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================