================================================================== BUG: KASAN: use-after-free in __lock_acquire+0xf0/0x651c kernel/locking/lockdep.c:4882 Read of size 8 at addr ffff0000e93e4048 by task syz.0.329/5371 CPU: 1 PID: 5371 Comm: syz.0.329 Not tainted 5.15.185-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 __lock_acquire+0xf0/0x651c kernel/locking/lockdep.c:4882 lock_acquire+0x1f4/0x620 kernel/locking/lockdep.c:5623 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0xb0/0x10c kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:363 [inline] lockref_put_or_lock+0x30/0xd0 lib/lockref.c:173 qd_put fs/gfs2/quota.c:309 [inline] gfs2_set_dqblk+0x2e8/0x9cc fs/gfs2/quota.c:1780 quota_setquota+0x428/0x4b8 fs/quota/quota.c:309 do_quotactl+0x65c/0x738 fs/quota/quota.c:801 __do_sys_quotactl fs/quota/quota.c:959 [inline] __se_sys_quotactl fs/quota/quota.c:915 [inline] __arm64_sys_quotactl+0x2ac/0x734 fs/quota/quota.c:915 __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 5371: 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 qd_get+0x294/0x608 fs/gfs2/quota.c:275 gfs2_set_dqblk+0x1a8/0x9cc fs/gfs2/quota.c:1704 quota_setquota+0x428/0x4b8 fs/quota/quota.c:309 do_quotactl+0x65c/0x738 fs/quota/quota.c:801 __do_sys_quotactl fs/quota/quota.c:959 [inline] __se_sys_quotactl fs/quota/quota.c:915 [inline] __arm64_sys_quotactl+0x2ac/0x734 fs/quota/quota.c:915 __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 5375: 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:576 __do_softirq kernel/softirq.c:610 [inline] do_softirq_own_stack include/asm-generic/softirq_stack.h:10 [inline] invoke_softirq kernel/softirq.c:457 [inline] __irq_exit_rcu+0x240/0x440 kernel/softirq.c:659 irq_exit+0x14/0x88 kernel/softirq.c:683 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_dirent_scan+0x458/0x584 fs/gfs2/dir.c:602 gfs2_dirent_search+0x24c/0x6f0 fs/gfs2/dir.c:850 gfs2_dir_search+0x5c/0x204 fs/gfs2/dir.c:1651 gfs2_lookupi+0x3bc/0x530 fs/gfs2/inode.c:332 __gfs2_lookup+0xa8/0x268 fs/gfs2/inode.c:873 gfs2_lookup+0x2c/0x3c fs/gfs2/inode.c:907 lookup_one_qstr_excl+0x108/0x230 fs/namei.c:1563 do_rmdir+0x18c/0x634 fs/namei.c:4198 __do_sys_unlinkat fs/namei.c:4390 [inline] __se_sys_unlinkat fs/namei.c:4384 [inline] __arm64_sys_unlinkat+0xcc/0xfc fs/namei.c:4384 __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 ffff0000e93e4000 which belongs to the cache gfs2_quotad of size 272 The buggy address is located 72 bytes inside of 272-byte region [ffff0000e93e4000, ffff0000e93e4110) The buggy address belongs to the page: page:00000000c9078d06 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1293e4 flags: 0x5ffc00000000200(slab|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000000200 0000000000000000 dead000000000122 ffff0000c6a37e00 raw: 0000000000000000 00000000800c000c 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000e93e3f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000e93e3f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff0000e93e4000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000e93e4080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000e93e4100: fb fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================