gfs2_quota_sync+0x2cc/0x500 fs/gfs2/quota.c:1329 quotad_check_timeo fs/gfs2/quota.c:1519 [inline] gfs2_quotad+0x2d8/0x500 fs/gfs2/quota.c:1566 kthread+0x250/0x2d8 kernel/kthread.c:376 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:850 ================================================================== BUG: KASAN: use-after-free in __up_write kernel/locking/rwsem.c:1366 [inline] BUG: KASAN: use-after-free in up_write+0x80/0x5bc kernel/locking/rwsem.c:1626 Read of size 8 at addr ffff000104f5f380 by task gfs2_quotad/14552 CPU: 0 PID: 14552 Comm: gfs2_quotad Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/03/2025 Call trace: dump_backtrace+0x1c0/0x1ec arch/arm64/kernel/stacktrace.c:158 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165 __dump_stack+0x30/0x40 lib/dump_stack.c:88 dump_stack_lvl+0xf4/0x15c lib/dump_stack.c:106 print_address_description+0x88/0x218 mm/kasan/report.c:316 print_report+0x50/0x68 mm/kasan/report.c:420 kasan_report+0xa8/0xfc mm/kasan/report.c:524 __asan_report_load8_noabort+0x2c/0x38 mm/kasan/report_generic.c:351 __up_write kernel/locking/rwsem.c:1366 [inline] up_write+0x80/0x5bc kernel/locking/rwsem.c:1626 inode_unlock include/linux/fs.h:763 [inline] do_sync+0x880/0xaec fs/gfs2/quota.c:984 gfs2_quota_sync+0x2cc/0x500 fs/gfs2/quota.c:1329 quotad_check_timeo fs/gfs2/quota.c:1519 [inline] gfs2_quotad+0x2d8/0x500 fs/gfs2/quota.c:1566 kthread+0x250/0x2d8 kernel/kthread.c:376 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:850 Allocated by task 14544: kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4c/0x80 mm/kasan/common.c:53 kasan_save_alloc_info+0x24/0x30 mm/kasan/generic.c:505 __kasan_slab_alloc+0x70/0x88 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook+0x74/0x430 mm/slab.h:737 slab_alloc_node mm/slub.c:3359 [inline] slab_alloc mm/slub.c:3367 [inline] __kmem_cache_alloc_lru mm/slub.c:3374 [inline] kmem_cache_alloc_lru+0x1a4/0x280 mm/slub.c:3390 alloc_inode_sb include/linux/fs.h:3245 [inline] gfs2_alloc_inode+0x58/0x110 fs/gfs2/super.c:1541 alloc_inode fs/inode.c:261 [inline] iget5_locked+0xa4/0x228 fs/inode.c:1328 gfs2_inode_lookup+0xec/0xae4 fs/gfs2/inode.c:124 gfs2_dir_search+0x148/0x204 fs/gfs2/dir.c:1664 gfs2_lookupi+0x3cc/0x5b0 fs/gfs2/inode.c:323 gfs2_lookup_simple+0xb0/0x104 fs/gfs2/inode.c:264 init_inodes+0x178/0x2d4 fs/gfs2/ops_fstype.c:904 gfs2_fill_super+0x11c0/0x194c fs/gfs2/ops_fstype.c:1246 get_tree_bdev+0x358/0x544 fs/super.c:1366 gfs2_get_tree+0x54/0x1b4 fs/gfs2/ops_fstype.c:1327 vfs_get_tree+0x90/0x274 fs/super.c:1573 do_new_mount+0x228/0x810 fs/namespace.c:3078 path_mount+0x5bc/0xe80 fs/namespace.c:3408 do_mount fs/namespace.c:3421 [inline] __do_sys_mount fs/namespace.c:3629 [inline] __se_sys_mount fs/namespace.c:3606 [inline] __arm64_sys_mount+0x49c/0x59c fs/namespace.c:3606 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b4 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x130 arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x128 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 Freed by task 14190: kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4c/0x80 mm/kasan/common.c:53 kasan_save_free_info+0x38/0x5c mm/kasan/generic.c:516 ____kasan_slab_free+0x148/0x1b0 mm/kasan/common.c:237 __kasan_slab_free+0x18/0x28 mm/kasan/common.c:245 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1729 [inline] slab_free_freelist_hook+0x16c/0x1e8 mm/slub.c:1755 slab_free mm/slub.c:3687 [inline] kmem_cache_free+0x118/0x314 mm/slub.c:3709 gfs2_free_inode+0x50/0x60 fs/gfs2/super.c:1555 i_callback+0x50/0x78 fs/inode.c:250 rcu_do_batch kernel/rcu/tree.c:2297 [inline] rcu_core+0x828/0x18b0 kernel/rcu/tree.c:2557 rcu_core_si+0x10/0x1c kernel/rcu/tree.c:2574 handle_softirqs+0x318/0xc60 kernel/softirq.c:596 __do_softirq+0x14/0x20 kernel/softirq.c:630 Last potentially related work creation: kasan_save_stack+0x40/0x70 mm/kasan/common.c:46 __kasan_record_aux_stack+0xc0/0xdc mm/kasan/generic.c:486 kasan_record_aux_stack_noalloc+0x14/0x20 mm/kasan/generic.c:496 call_rcu+0x100/0x94c kernel/rcu/tree.c:2849 destroy_inode fs/inode.c:316 [inline] evict+0x760/0x828 fs/inode.c:720 iput_final fs/inode.c:1834 [inline] iput+0x754/0x7e4 fs/inode.c:1860 gfs2_put_super+0x330/0x760 fs/gfs2/super.c:616 generic_shutdown_super+0x130/0x324 fs/super.c:501 kill_block_super+0x70/0xdc fs/super.c:1470 gfs2_kill_sb+0xc0/0xd4 fs/gfs2/ops_fstype.c:-1 deactivate_locked_super+0xac/0x120 fs/super.c:332 deactivate_super+0xe4/0x104 fs/super.c:363 cleanup_mnt+0x390/0x418 fs/namespace.c:1191 __cleanup_mnt+0x20/0x30 fs/namespace.c:1198 task_work_run+0x1ec/0x278 kernel/task_work.c:203 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] do_notify_resume+0x1fa0/0x2aa4 arch/arm64/kernel/signal.c:1137 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:137 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:142 [inline] el0_svc+0x98/0x128 arch/arm64/kernel/entry-common.c:638 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 The buggy address belongs to the object at ffff000104f5f238 which belongs to the cache gfs2_inode of size 1592 The buggy address is located 328 bytes inside of 1592-byte region [ffff000104f5f238, ffff000104f5f870) The buggy address belongs to the physical page: page:000000000528a4bd refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x144f58 head:000000000528a4bd order:3 compound_mapcount:0 compound_pincount:0 memcg:ffff0000c377c801 flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000010200 0000000000000000 dead000000000122 ffff0000c70d1e00 raw: 0000000000000000 0000000000130013 00000001ffffffff ffff0000c377c801 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff000104f5f280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff000104f5f300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff000104f5f380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff000104f5f400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff000104f5f480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== Unable to handle kernel paging request at virtual address dfff800000000002 KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017] Mem abort info: ESR = 0x0000000096000006 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x06: level 2 translation fault Data abort info: ISV = 0, ISS = 0x00000006 CM = 0, WnR = 0 [dfff800000000002] address between user and kernel address ranges Internal error: Oops: 0000000096000006 [#1] PREEMPT SMP Modules linked in: CPU: 1 PID: 14552 Comm: gfs2_quotad Tainted: G B syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/03/2025 pstate: 02400005 (nzcv daif +PAN -UAO +TCO -DIT -SSBS BTYPE=--) pc : do_sync+0x8ac/0xaec fs/gfs2/quota.c:986 lr : do_sync+0x8a0/0xaec fs/gfs2/quota.c:986 sp : ffff800022597ae0 x29: ffff800022597c20 x28: 0000000000000001 x27: ffff80000a217dcc x26: 00000000fffffffb x25: ffff000104f5f238 x24: dfff800000000000 x23: ffff7000044b2f68 x22: ffff0000ead71900 x21: ffff0000ef01b000 x20: 0000000000000000 x19: ffff0000ead71900 x18: ffff800011b7bf60 x17: 1fffe00033eaed7e x16: ffff800008042fdc x15: 0000000000000000 x14: 00000000ffff8000 x13: 0000000058d88560 x12: 0000000000ff0100 x11: ff00800008048288 x10: 0000000000000000 x9 : ffff80001c465a90 x8 : 0000000000000002 x7 : 0000000000000000 x6 : 000000000000003f x5 : 0000000000000040 x4 : 0000000000000001 x3 : ffff80000a2161a4 x2 : 0000000000000000 x1 : 0000000000000008 x0 : 0000000000000010 Call trace: do_sync+0x8ac/0xaec fs/gfs2/quota.c:986 gfs2_quota_sync+0x2cc/0x500 fs/gfs2/quota.c:1329 quotad_check_timeo fs/gfs2/quota.c:1519 [inline] gfs2_quotad+0x2d8/0x500 fs/gfs2/quota.c:1566 kthread+0x250/0x2d8 kernel/kthread.c:376 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:850 Code: 979b3c4b f9400294 91004280 d343fc08 (38786908) ---[ end trace 0000000000000000 ]--- ---------------- Code disassembly (best guess): 0: 979b3c4b bl 0xfffffffffe6cf12c 4: f9400294 ldr x20, [x20] 8: 91004280 add x0, x20, #0x10 c: d343fc08 lsr x8, x0, #3 * 10: 38786908 ldrb w8, [x8, x24] <-- trapping instruction