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 ffff0000e9680090 by task syz-executor/4038 CPU: 0 PID: 4038 Comm: syz-executor 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_filesystem+0xe8/0x218 fs/sync.c:56 generic_shutdown_super+0x70/0x2f0 fs/super.c:448 kill_block_super+0x70/0xdc fs/super.c:1427 gfs2_kill_sb+0xc0/0xd4 fs/gfs2/ops_fstype.c:-1 deactivate_locked_super+0xb8/0x13c fs/super.c:335 deactivate_super+0xf8/0x118 fs/super.c:366 cleanup_mnt+0x3a4/0x458 fs/namespace.c:1143 __cleanup_mnt+0x20/0x30 fs/namespace.c:1150 task_work_run+0x12c/0x1e0 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] do_notify_resume+0x24b4/0x3128 arch/arm64/kernel/signal.c:949 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:133 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:138 [inline] el0_svc+0xf0/0x1e0 arch/arm64/kernel/entry-common.c:609 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 4136: 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 3644: 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 __do_softirq kernel/softirq.c:592 [inline] do_softirq_own_stack include/asm-generic/softirq_stack.h:10 [inline] invoke_softirq kernel/softirq.c:439 [inline] __irq_exit_rcu+0x240/0x440 kernel/softirq.c:641 irq_exit+0x14/0x88 kernel/softirq.c:665 handle_domain_irq+0x14c/0x1fc kernel/irq/irqdesc.c:711 gic_handle_irq+0x78/0x1c8 drivers/irqchip/irq-gic-v3.c:765 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+0x1f0/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_filesystem+0xe8/0x218 fs/sync.c:56 generic_shutdown_super+0x70/0x2f0 fs/super.c:448 kill_block_super+0x70/0xdc fs/super.c:1427 gfs2_kill_sb+0xc0/0xd4 fs/gfs2/ops_fstype.c:-1 deactivate_locked_super+0xb8/0x13c fs/super.c:335 deactivate_super+0xf8/0x118 fs/super.c:366 cleanup_mnt+0x3a4/0x458 fs/namespace.c:1143 __cleanup_mnt+0x20/0x30 fs/namespace.c:1150 task_work_run+0x12c/0x1e0 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] do_notify_resume+0x24b4/0x3128 arch/arm64/kernel/signal.c:949 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:133 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:138 [inline] el0_svc+0xf0/0x1e0 arch/arm64/kernel/entry-common.c:609 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 ffff0000e9680000 which belongs to the cache gfs2_quotad of size 272 The buggy address is located 144 bytes inside of 272-byte region [ffff0000e9680000, ffff0000e9680110) The buggy address belongs to the page: page:000000001f0d2e47 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x129680 flags: 0x5ffc00000000200(slab|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000000200 0000000000000000 dead000000000122 ffff0000c6cca480 raw: 0000000000000000 00000000800c000c 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000e967ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000e9680000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff0000e9680080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000e9680100: fb fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000e9680180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================