do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x78/0x1e0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0xcc/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 ================================================================== BUG: KASAN: use-after-free in arch_test_bit include/asm-generic/bitops/non-atomic.h:118 [inline] BUG: KASAN: use-after-free in qd_unlock+0x40/0x2b8 fs/gfs2/quota.c:497 Read of size 8 at addr ffff0000e973e090 by task syz.3.75/4282 CPU: 0 PID: 4282 Comm: syz.3.75 Not tainted 5.15.184-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call trace: dump_backtrace+0x0/0x43c arch/arm64/kernel/stacktrace.c:152 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216 __dump_stack+0x30/0x40 lib/dump_stack.c:88 dump_stack_lvl+0xf8/0x160 lib/dump_stack.c:106 print_address_description+0x78/0x30c mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xec/0x15c mm/kasan/report.c:451 __asan_report_load8_noabort+0x44/0x50 mm/kasan/report_generic.c:309 arch_test_bit include/asm-generic/bitops/non-atomic.h:118 [inline] qd_unlock+0x40/0x2b8 fs/gfs2/quota.c:497 gfs2_quota_sync+0x3c8/0x548 fs/gfs2/quota.c:1336 gfs2_sync_fs+0x4c/0xc4 fs/gfs2/super.c:647 sync_fs_one_sb+0xd8/0x120 fs/sync.c:84 iterate_supers+0x11c/0x1d0 fs/super.c:718 ksys_sync+0xa4/0x164 fs/sync.c:103 __arm64_sys_sync+0x14/0x24 fs/sync.c:113 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x78/0x1e0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0xcc/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 Allocated by task 4291: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] __kasan_slab_alloc+0x8c/0xcc mm/kasan/common.c:467 kasan_slab_alloc include/linux/kasan.h:254 [inline] slab_post_alloc_hook+0x74/0x408 mm/slab.h:519 slab_alloc_node mm/slub.c:3220 [inline] slab_alloc mm/slub.c:3228 [inline] kmem_cache_alloc+0x1e0/0x3e4 mm/slub.c:3233 kmem_cache_zalloc include/linux/slab.h:725 [inline] qd_alloc+0x64/0x22c fs/gfs2/quota.c:216 gfs2_quota_init+0x610/0xd6c fs/gfs2/quota.c:1426 gfs2_make_fs_rw+0x32c/0x460 fs/gfs2/super.c:155 gfs2_fill_super+0x1364/0x19e0 fs/gfs2/ops_fstype.c:1276 get_tree_bdev+0x358/0x544 fs/super.c:1325 gfs2_get_tree+0x54/0x1b4 fs/gfs2/ops_fstype.c:1332 vfs_get_tree+0x90/0x274 fs/super.c:1530 do_new_mount+0x228/0x810 fs/namespace.c:3014 path_mount+0x5b4/0x1000 fs/namespace.c:3344 do_mount fs/namespace.c:3357 [inline] __do_sys_mount fs/namespace.c:3565 [inline] __se_sys_mount fs/namespace.c:3542 [inline] __arm64_sys_mount+0x514/0x5e4 fs/namespace.c:3542 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x78/0x1e0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0xcc/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 Freed by task 14: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4c/0x84 mm/kasan/common.c:46 kasan_set_free_info+0x28/0x4c mm/kasan/generic.c:360 ____kasan_slab_free+0x118/0x164 mm/kasan/common.c:366 __kasan_slab_free+0x18/0x28 mm/kasan/common.c:374 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1705 [inline] slab_free_freelist_hook+0x128/0x1e8 mm/slub.c:1731 slab_free mm/slub.c:3499 [inline] kmem_cache_free+0xdc/0x3b4 mm/slub.c:3515 gfs2_qd_dealloc+0x54/0x64 fs/gfs2/quota.c:109 rcu_do_batch kernel/rcu/tree.c:2523 [inline] rcu_core+0x7c8/0x1764 kernel/rcu/tree.c:2763 rcu_core_si+0x10/0x1c kernel/rcu/tree.c:2776 handle_softirqs+0x344/0xbf0 kernel/softirq.c:558 run_ksoftirqd+0x7c/0x2a0 kernel/softirq.c:925 smpboot_thread_fn+0x4b0/0x920 kernel/smpboot.c:164 kthread+0x374/0x454 kernel/kthread.c:334 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870 Last potentially related work creation: kasan_save_stack+0x38/0x68 mm/kasan/common.c:38 kasan_record_aux_stack+0xcc/0x114 mm/kasan/generic.c:348 __call_rcu kernel/rcu/tree.c:3007 [inline] call_rcu+0x110/0x8f0 kernel/rcu/tree.c:3087 gfs2_quota_cleanup+0x3f0/0x670 fs/gfs2/quota.c:1490 gfs2_make_fs_ro+0x3f0/0x51c fs/gfs2/super.c:557 signal_our_withdraw fs/gfs2/util.c:166 [inline] gfs2_withdraw+0x4cc/0x129c fs/gfs2/util.c:343 gfs2_consist_inode_i+0xcc/0xe8 fs/gfs2/util.c:456 gfs2_dinode_in fs/gfs2/glops.c:465 [inline] gfs2_inode_refresh+0x920/0xda8 fs/gfs2/glops.c:485 inode_go_lock+0xfc/0x38c fs/gfs2/glops.c:510 do_promote+0x678/0xa70 fs/gfs2/glock.c:507 finish_xmote+0x450/0xb2c fs/gfs2/glock.c:678 do_xmote+0x674/0xf90 fs/gfs2/glock.c:824 run_queue+0x3fc/0x6c0 fs/gfs2/glock.c:872 gfs2_glock_nq+0x828/0x141c fs/gfs2/glock.c:1534 gfs2_glock_nq_init fs/gfs2/glock.h:246 [inline] do_sync+0x3c4/0xa4c fs/gfs2/quota.c:927 gfs2_quota_sync+0x2e8/0x548 fs/gfs2/quota.c:1329 gfs2_sync_fs+0x4c/0xc4 fs/gfs2/super.c:647 sync_fs_one_sb+0xd8/0x120 fs/sync.c:84 iterate_supers+0x11c/0x1d0 fs/super.c:718 ksys_sync+0xa4/0x164 fs/sync.c:103 __arm64_sys_sync+0x14/0x24 fs/sync.c:113 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x78/0x1e0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0xcc/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 The buggy address belongs to the object at ffff0000e973e000 which belongs to the cache gfs2_quotad of size 272 The buggy address is located 144 bytes inside of 272-byte region [ffff0000e973e000, ffff0000e973e110) The buggy address belongs to the page: page:00000000093de693 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x12973e flags: 0x5ffc00000000200(slab|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000000200 0000000000000000 dead000000000122 ffff0000c6cd2180 raw: 0000000000000000 00000000800c000c 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000e973df80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000e973e000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff0000e973e080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000e973e100: fb fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000e973e180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================