RSP: 002b:00007fff2aa9a1c8 EFLAGS: 00000202 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f608e4e1c57 RDX: 00007fff2aa9a289 RSI: 000000000000000a RDI: 00007fff2aa9a280 RBP: 00007fff2aa9a280 R08: 00000000ffffffff R09: 00007fff2aa9a060 R10: 00005555556c5653 R11: 0000000000000202 R12: 00007fff2aa9b2e0 R13: 00005555556c55f0 R14: 00007fff2aa9a1f0 R15: 0000000000000001 ================================================================== BUG: KASAN: slab-use-after-free in instrument_atomic_read include/linux/instrumented.h:68 [inline] BUG: KASAN: slab-use-after-free in _test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline] BUG: KASAN: slab-use-after-free in qd_unlock+0x30/0x2d0 fs/gfs2/quota.c:490 Read of size 8 at addr ffff888075e36090 by task syz-executor681/4992 CPU: 1 PID: 4992 Comm: syz-executor681 Not tainted 6.4.0-rc7-syzkaller-00019-g99ec1ed7c2ed #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:351 [inline] print_report+0x163/0x540 mm/kasan/report.c:462 kasan_report+0x176/0x1b0 mm/kasan/report.c:572 kasan_check_range+0x283/0x290 mm/kasan/generic.c:187 instrument_atomic_read include/linux/instrumented.h:68 [inline] _test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline] qd_unlock+0x30/0x2d0 fs/gfs2/quota.c:490 gfs2_quota_sync+0x6e7/0x820 fs/gfs2/quota.c:1325 gfs2_sync_fs+0x4d/0xb0 fs/gfs2/super.c:665 sync_filesystem+0xec/0x220 fs/sync.c:56 generic_shutdown_super+0x6f/0x340 fs/super.c:473 kill_block_super+0x84/0xf0 fs/super.c:1407 deactivate_locked_super+0xa4/0x110 fs/super.c:331 cleanup_mnt+0x426/0x4c0 fs/namespace.c:1177 task_work_run+0x24a/0x300 kernel/task_work.c:179 ptrace_notify+0x2cd/0x380 kernel/signal.c:2371 ptrace_report_syscall include/linux/ptrace.h:411 [inline] ptrace_report_syscall_exit include/linux/ptrace.h:473 [inline] syscall_exit_work kernel/entry/common.c:252 [inline] syscall_exit_to_user_mode_prepare kernel/entry/common.c:279 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:284 [inline] syscall_exit_to_user_mode+0x157/0x280 kernel/entry/common.c:297 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f608e4e1c57 Code: 08 00 48 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 a6 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fff2aa9a1c8 EFLAGS: 00000202 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f608e4e1c57 RDX: 00007fff2aa9a289 RSI: 000000000000000a RDI: 00007fff2aa9a280 RBP: 00007fff2aa9a280 R08: 00000000ffffffff R09: 00007fff2aa9a060 R10: 00005555556c5653 R11: 0000000000000202 R12: 00007fff2aa9b2e0 R13: 00005555556c55f0 R14: 00007fff2aa9a1f0 R15: 0000000000000001 Allocated by task 4993: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4f/0x70 mm/kasan/common.c:52 __kasan_slab_alloc+0x66/0x70 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook+0x68/0x3a0 mm/slab.h:711 slab_alloc_node mm/slub.c:3451 [inline] slab_alloc mm/slub.c:3459 [inline] __kmem_cache_alloc_lru mm/slub.c:3466 [inline] kmem_cache_alloc+0x11f/0x2e0 mm/slub.c:3475 kmem_cache_zalloc include/linux/slab.h:670 [inline] qd_alloc+0x51/0x250 fs/gfs2/quota.c:216 gfs2_quota_init+0x7ee/0x1110 fs/gfs2/quota.c:1415 gfs2_make_fs_rw+0x43a/0x5c0 fs/gfs2/super.c:155 gfs2_fill_super+0x2530/0x2840 fs/gfs2/ops_fstype.c:1277 get_tree_bdev+0x405/0x620 fs/super.c:1303 gfs2_get_tree+0x54/0x210 fs/gfs2/ops_fstype.c:1335 vfs_get_tree+0x8c/0x270 fs/super.c:1510 do_new_mount+0x28f/0xae0 fs/namespace.c:3039 do_mount fs/namespace.c:3382 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount+0x2d9/0x3c0 fs/namespace.c:3568 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 0: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4f/0x70 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:521 ____kasan_slab_free+0xd6/0x120 mm/kasan/common.c:236 kasan_slab_free include/linux/kasan.h:162 [inline] slab_free_hook mm/slub.c:1781 [inline] slab_free_freelist_hook mm/slub.c:1807 [inline] slab_free mm/slub.c:3786 [inline] kmem_cache_free+0x297/0x520 mm/slub.c:3808 rcu_do_batch kernel/rcu/tree.c:2115 [inline] rcu_core+0x9d7/0x15f0 kernel/rcu/tree.c:2377 __do_softirq+0x2ab/0x908 kernel/softirq.c:571 Last potentially related work creation: kasan_save_stack+0x3f/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xb0/0xc0 mm/kasan/generic.c:491 __call_rcu_common kernel/rcu/tree.c:2627 [inline] call_rcu+0x167/0xa70 kernel/rcu/tree.c:2741 gfs2_quota_cleanup+0x442/0x6b0 fs/gfs2/quota.c:1479 gfs2_make_fs_ro+0x589/0x680 fs/gfs2/super.c:575 signal_our_withdraw fs/gfs2/util.c:166 [inline] gfs2_withdraw+0x62b/0x1550 fs/gfs2/util.c:351 gfs2_dinode_in fs/gfs2/glops.c:469 [inline] gfs2_inode_refresh+0xbe2/0x1060 fs/gfs2/glops.c:489 gfs2_instantiate+0x18c/0x250 fs/gfs2/glock.c:454 gfs2_glock_holder_ready fs/gfs2/glock.c:1319 [inline] gfs2_glock_wait+0x1df/0x2b0 fs/gfs2/glock.c:1339 gfs2_glock_nq_init fs/gfs2/glock.h:261 [inline] do_sync+0x492/0xc70 fs/gfs2/quota.c:916 gfs2_quota_sync+0x37d/0x820 fs/gfs2/quota.c:1318 gfs2_sync_fs+0x4d/0xb0 fs/gfs2/super.c:665 sync_filesystem+0xec/0x220 fs/sync.c:56 generic_shutdown_super+0x6f/0x340 fs/super.c:473 kill_block_super+0x84/0xf0 fs/super.c:1407 deactivate_locked_super+0xa4/0x110 fs/super.c:331 cleanup_mnt+0x426/0x4c0 fs/namespace.c:1177 task_work_run+0x24a/0x300 kernel/task_work.c:179 ptrace_notify+0x2cd/0x380 kernel/signal.c:2371 ptrace_report_syscall include/linux/ptrace.h:411 [inline] ptrace_report_syscall_exit include/linux/ptrace.h:473 [inline] syscall_exit_work kernel/entry/common.c:252 [inline] syscall_exit_to_user_mode_prepare kernel/entry/common.c:279 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:284 [inline] syscall_exit_to_user_mode+0x157/0x280 kernel/entry/common.c:297 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff888075e36000 which belongs to the cache gfs2_quotad of size 272 The buggy address is located 144 bytes inside of freed 272-byte region [ffff888075e36000, ffff888075e36110) The buggy address belongs to the physical page: page:ffffea0001d78d80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x75e36 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000200 ffff8881442f1c80 dead000000000122 0000000000000000 raw: 0000000000000000 00000000800c000c 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Reclaimable, gfp_mask 0x12c50(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_RECLAIMABLE), pid 4993, tgid 4993 (syz-executor681), ts 58231744744, free_ts 13177397283 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1731 prep_new_page mm/page_alloc.c:1738 [inline] get_page_from_freelist+0x321c/0x33a0 mm/page_alloc.c:3502 __alloc_pages+0x255/0x670 mm/page_alloc.c:4768 alloc_slab_page+0x6a/0x160 mm/slub.c:1851 allocate_slab mm/slub.c:1998 [inline] new_slab+0x84/0x2f0 mm/slub.c:2051 ___slab_alloc+0xa85/0x10a0 mm/slub.c:3192 __slab_alloc mm/slub.c:3291 [inline] __slab_alloc_node mm/slub.c:3344 [inline] slab_alloc_node mm/slub.c:3441 [inline] slab_alloc mm/slub.c:3459 [inline] __kmem_cache_alloc_lru mm/slub.c:3466 [inline] kmem_cache_alloc+0x1b9/0x2e0 mm/slub.c:3475 kmem_cache_zalloc include/linux/slab.h:670 [inline] qd_alloc+0x51/0x250 fs/gfs2/quota.c:216 gfs2_quota_init+0x7ee/0x1110 fs/gfs2/quota.c:1415 gfs2_make_fs_rw+0x43a/0x5c0 fs/gfs2/super.c:155 gfs2_fill_super+0x2530/0x2840 fs/gfs2/ops_fstype.c:1277 get_tree_bdev+0x405/0x620 fs/super.c:1303 gfs2_get_tree+0x54/0x210 fs/gfs2/ops_fstype.c:1335 vfs_get_tree+0x8c/0x270 fs/super.c:1510 do_new_mount+0x28f/0xae0 fs/namespace.c:3039 do_mount fs/namespace.c:3382 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount+0x2d9/0x3c0 fs/namespace.c:3568 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1302 [inline] free_unref_page_prepare+0x903/0xa30 mm/page_alloc.c:2564 free_unref_page+0x37/0x3f0 mm/page_alloc.c:2659 free_contig_range+0x9e/0x150 mm/page_alloc.c:6994 destroy_args+0x102/0x9a0 mm/debug_vm_pgtable.c:1023 debug_vm_pgtable+0x405/0x490 mm/debug_vm_pgtable.c:1403 do_one_initcall+0x23d/0x7d0 init/main.c:1246 do_initcall_level+0x157/0x210 init/main.c:1319 do_initcalls+0x3f/0x80 init/main.c:1335 kernel_init_freeable+0x43b/0x5d0 init/main.c:1571 kernel_init+0x1d/0x2a0 init/main.c:1462 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Memory state around the buggy address: ffff888075e35f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888075e36000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888075e36080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888075e36100: fb fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888075e36180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================