(syz-executor348,4162,0):ocfs2_block_check_validate:402 ERROR: CRC32 failed: stored: 0xcfdff595, computed 0xefed4a20. Applying ECC. JBD2: Ignoring recovery information on journal ocfs2: Mounting device (7,0) on (node local, slot 0) with ordered data mode. ================================================================== BUG: KASAN: use-after-free in ocfs2_lock_global_qf+0xb4/0x2a0 fs/ocfs2/quota_global.c:303 Read of size 8 at addr ffff888146fa4828 by task syz-executor348/4162 CPU: 0 PID: 4162 Comm: syz-executor348 Not tainted 5.15.176-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106 print_address_description+0x63/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0x16b/0x1c0 mm/kasan/report.c:451 ocfs2_lock_global_qf+0xb4/0x2a0 fs/ocfs2/quota_global.c:303 ocfs2_get_next_id+0x21c/0x710 fs/ocfs2/quota_global.c:888 dquot_get_next_dqblk+0x6e/0x3a0 fs/quota/dquot.c:2710 quota_getnextquota+0x2bc/0x6b0 fs/quota/quota.c:249 __do_sys_quotactl fs/quota/quota.c:959 [inline] __se_sys_quotactl+0x2b1/0x770 fs/quota/quota.c:915 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f9ff2699b99 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 17 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffddeec7a58 EFLAGS: 00000246 ORIG_RAX: 00000000000000b3 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f9ff2699b99 RDX: 000000000000ee01 RSI: 00000000200080c0 RDI: ffffffff80000901 RBP: 00007f9ff27115f0 R08: 0000000020000c40 R09: 0000555565bbd4c0 R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffddeec7a80 R13: 00007ffddeec7ca8 R14: 431bde82d7b634db R15: 00007f9ff26e203b Allocated by task 4162: 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_kmalloc+0xba/0xf0 mm/kasan/common.c:513 kasan_kmalloc include/linux/kasan.h:264 [inline] kmem_cache_alloc_trace+0x143/0x290 mm/slub.c:3247 kmalloc include/linux/slab.h:591 [inline] ocfs2_local_read_info+0x1ea/0x19e0 fs/ocfs2/quota_local.c:696 dquot_load_quota_sb+0x754/0xb90 fs/quota/dquot.c:2463 dquot_load_quota_inode+0x318/0x600 fs/quota/dquot.c:2500 ocfs2_enable_quotas+0x221/0x440 fs/ocfs2/super.c:927 ocfs2_fill_super+0x4423/0x5890 fs/ocfs2/super.c:1140 mount_bdev+0x2c9/0x3f0 fs/super.c:1400 legacy_get_tree+0xeb/0x180 fs/fs_context.c:611 vfs_get_tree+0x88/0x270 fs/super.c:1530 do_new_mount+0x2ba/0xb40 fs/namespace.c:3012 do_mount fs/namespace.c:3355 [inline] __do_sys_mount fs/namespace.c:3563 [inline] __se_sys_mount+0x2d5/0x3c0 fs/namespace.c:3540 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Freed by task 4162: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4b/0x80 mm/kasan/common.c:46 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360 ____kasan_slab_free+0xd8/0x120 mm/kasan/common.c:366 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1705 [inline] slab_free_freelist_hook+0xdd/0x160 mm/slub.c:1731 slab_free mm/slub.c:3499 [inline] kfree+0xf1/0x270 mm/slub.c:4559 ocfs2_local_free_info+0x813/0x990 fs/ocfs2/quota_local.c:869 dquot_disable+0x1111/0x1c60 fs/quota/dquot.c:2309 dquot_suspend include/linux/quotaops.h:84 [inline] ocfs2_susp_quotas+0x247/0x340 fs/ocfs2/super.c:893 ocfs2_remount+0x56e/0xc30 fs/ocfs2/super.c:648 reconfigure_super+0x43a/0x870 fs/super.c:938 do_remount fs/namespace.c:2668 [inline] path_mount+0xceb/0x10a0 fs/namespace.c:3334 do_mount fs/namespace.c:3355 [inline] __do_sys_mount fs/namespace.c:3563 [inline] __se_sys_mount+0x2d5/0x3c0 fs/namespace.c:3540 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 The buggy address belongs to the object at ffff888146fa4800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 40 bytes inside of 1024-byte region [ffff888146fa4800, ffff888146fa4c00) The buggy address belongs to the page: page:ffffea00051be800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x146fa0 head:ffffea00051be800 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x57ff00000010200(slab|head|node=1|zone=2|lastcpupid=0x7ff) raw: 057ff00000010200 ffffea000511fe00 0000000400000004 ffff888017441dc0 raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, ts 8152103999, free_ts 0 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x3b78/0x3d40 mm/page_alloc.c:4192 __alloc_pages+0x272/0x700 mm/page_alloc.c:5465 alloc_page_interleave+0x22/0x1c0 mm/mempolicy.c:2031 alloc_slab_page mm/slub.c:1775 [inline] allocate_slab mm/slub.c:1912 [inline] new_slab+0xbb/0x4b0 mm/slub.c:1975 ___slab_alloc+0x6f6/0xe10 mm/slub.c:3008 __slab_alloc mm/slub.c:3095 [inline] slab_alloc_node mm/slub.c:3186 [inline] slab_alloc mm/slub.c:3228 [inline] __kmalloc+0x1c9/0x300 mm/slub.c:4403 kmalloc_array include/linux/slab.h:631 [inline] blk_stat_alloc_callback+0x95/0x230 block/blk-stat.c:113 blk_mq_init_allocated_queue+0x86/0x17a0 block/blk-mq.c:3304 blk_mq_init_queue_data block/blk-mq.c:3154 [inline] __blk_mq_alloc_disk+0x82/0x160 block/blk-mq.c:3174 loop_add+0x28f/0x880 drivers/block/loop.c:2377 loop_init+0x172/0x230 drivers/block/loop.c:2614 do_one_initcall+0x22b/0x7a0 init/main.c:1302 do_initcall_level+0x157/0x210 init/main.c:1375 do_initcalls+0x49/0x90 init/main.c:1391 kernel_init_freeable+0x425/0x5c0 init/main.c:1615 kernel_init+0x19/0x290 init/main.c:1506 page_owner free stack trace missing Memory state around the buggy address: ffff888146fa4700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888146fa4780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888146fa4800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888146fa4880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888146fa4900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================