(syz.3.15,4617,0):ocfs2_block_check_validate:444 ERROR: CRC32 failed: stored: 0xb3775c19, computed 0x2dd1c265. Applying ECC. (syz.3.15,4617,1):ocfs2_block_check_validate:444 ERROR: CRC32 failed: stored: 0xcfdff595, computed 0xefed4a20. Applying ECC. JBD2: Ignoring recovery information on journal ocfs2: Mounting device (7,3) on (node local, slot 0) with ordered data mode. ================================================================== BUG: KASAN: use-after-free in ocfs2_lock_global_qf+0x1de/0x220 fs/ocfs2/quota_global.c:303 Read of size 8 at addr ffff8800a85b8928 by task syz.3.15/4617 CPU: 1 PID: 4617 Comm: syz.3.15 Not tainted 4.19.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x10c/0x17a lib/dump_stack.c:113 print_address_description.cold.6+0x9/0x244 mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report mm/kasan/report.c:412 [inline] kasan_report.cold.7+0x242/0x305 mm/kasan/report.c:396 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 ocfs2_lock_global_qf+0x1de/0x220 fs/ocfs2/quota_global.c:303 ocfs2_get_next_id+0x1e0/0x430 fs/ocfs2/quota_global.c:888 dquot_get_next_dqblk+0x72/0x140 fs/quota/dquot.c:2643 quota_getnextquota+0x204/0x490 fs/quota/quota.c:238 do_quotactl fs/quota/quota.c:733 [inline] kernel_quotactl+0x625/0x1020 fs/quota/quota.c:877 __do_sys_quotactl fs/quota/quota.c:892 [inline] __se_sys_quotactl fs/quota/quota.c:889 [inline] __x64_sys_quotactl+0x92/0xf0 fs/quota/quota.c:889 do_syscall_64+0xd0/0x340 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f572be51f19 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f572b8d1058 EFLAGS: 00000246 ORIG_RAX: 00000000000000b3 RAX: ffffffffffffffda RBX: 00007f572c017fa0 RCX: 00007f572be51f19 RDX: 0000000000000000 RSI: 00000000200001c0 RDI: ffffffff80000900 RBP: 00007f572bec5cc8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f572c017fa0 R15: 00007ffe9d30c478 Allocated by task 4617: save_stack mm/kasan/kasan.c:448 [inline] set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc.part.1+0x62/0xf0 mm/kasan/kasan.c:553 kasan_kmalloc+0xaf/0xc0 mm/kasan/kasan.c:538 kmem_cache_alloc_trace+0x13c/0x260 mm/slub.c:2733 kmalloc include/linux/slab.h:513 [inline] ocfs2_local_read_info+0x159/0x1230 fs/ocfs2/quota_local.c:696 vfs_load_quota_inode+0x54d/0xfd0 fs/quota/dquot.c:2373 dquot_enable+0x121/0x170 fs/quota/dquot.c:2488 ocfs2_enable_quotas+0x25d/0x550 fs/ocfs2/super.c:959 ocfs2_fill_super.cold.15+0x177/0x333 fs/ocfs2/super.c:1199 mount_bdev+0x272/0x330 fs/super.c:1158 ocfs2_mount+0x10/0x20 fs/ocfs2/super.c:1241 mount_fs+0x84/0x1f5 fs/super.c:1261 vfs_kern_mount.part.11+0x58/0x3d0 fs/namespace.c:961 vfs_kern_mount fs/namespace.c:951 [inline] do_new_mount fs/namespace.c:2457 [inline] do_mount+0x376/0x26e0 fs/namespace.c:2787 ksys_mount+0xb1/0xd0 fs/namespace.c:3003 __do_sys_mount fs/namespace.c:3017 [inline] __se_sys_mount fs/namespace.c:3014 [inline] __x64_sys_mount+0xb9/0x150 fs/namespace.c:3014 do_syscall_64+0xd0/0x340 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 4617: save_stack mm/kasan/kasan.c:448 [inline] set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x167/0x240 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 slab_free_hook mm/slub.c:1371 [inline] slab_free_freelist_hook mm/slub.c:1398 [inline] slab_free mm/slub.c:2953 [inline] kfree+0x110/0x2c0 mm/slub.c:3906 ocfs2_local_free_info+0x413/0x810 fs/ocfs2/quota_local.c:865 dquot_disable+0x5e3/0x18d0 fs/quota/dquot.c:2227 dquot_suspend include/linux/quotaops.h:77 [inline] ocfs2_susp_quotas.isra.7+0x1ed/0x2f0 fs/ocfs2/super.c:925 ocfs2_remount+0x1ee/0xc40 fs/ocfs2/super.c:680 do_remount_sb+0x15b/0x640 fs/super.c:888 do_remount fs/namespace.c:2278 [inline] do_mount+0xfd8/0x26e0 fs/namespace.c:2778 ksys_mount+0xb1/0xd0 fs/namespace.c:3003 __do_sys_mount fs/namespace.c:3017 [inline] __se_sys_mount fs/namespace.c:3014 [inline] __x64_sys_mount+0xb9/0x150 fs/namespace.c:3014 do_syscall_64+0xd0/0x340 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff8800a85b8900 which belongs to the cache kmalloc-1024 of size 1024 The buggy address is located 40 bytes inside of 1024-byte region [ffff8800a85b8900, ffff8800a85b8d00) The buggy address belongs to the page: page:ffffea0002a16e00 count:1 mapcount:0 mapping:ffff88013bff4a00 index:0x0 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffffea0002322700 0000000300000003 ffff88013bff4a00 raw: 0000000000000000 00000000000e000e 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page allocated via order 2, migratetype Unmovable, gfp_mask 0x352c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL) set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook mm/page_alloc.c:1906 [inline] prep_new_page mm/page_alloc.c:1914 [inline] get_page_from_freelist+0x2c68/0x41c0 mm/page_alloc.c:3345 __alloc_pages_nodemask+0x390/0x2380 mm/page_alloc.c:4370 alloc_pages_current+0xfd/0x290 mm/mempolicy.c:2093 alloc_pages include/linux/gfp.h:509 [inline] alloc_slab_page mm/slub.c:1438 [inline] allocate_slab mm/slub.c:1583 [inline] new_slab+0x49d/0x7f0 mm/slub.c:1654 new_slab_objects mm/slub.c:2417 [inline] ___slab_alloc+0x5b3/0x8e0 mm/slub.c:2569 __slab_alloc.isra.22+0x6a/0xa0 mm/slub.c:2609 slab_alloc_node mm/slub.c:2672 [inline] __kmalloc_node+0xe2/0x3a0 mm/slub.c:3792 kmalloc_node include/linux/slab.h:555 [inline] kvmalloc_node+0x68/0x70 mm/util.c:423 kvmalloc include/linux/mm.h:577 [inline] kvzalloc include/linux/mm.h:585 [inline] bucket_table_alloc.isra.6+0x39/0x3d0 lib/rhashtable.c:176 rhashtable_init+0x3df/0x7f0 lib/rhashtable.c:1065 ipc_init_ids+0x8d/0x1e0 ipc/util.c:120 msg_init_ns+0x146/0x180 ipc/msg.c:1249 create_ipc_ns ipc/namespace.c:63 [inline] copy_ipcs+0x300/0x390 ipc/namespace.c:84 create_new_namespaces+0x22a/0x750 kernel/nsproxy.c:87 unshare_nsproxy_namespaces+0x8b/0x1a0 kernel/nsproxy.c:206 ksys_unshare+0x31b/0x6e0 kernel/fork.c:2489 Memory state around the buggy address: ffff8800a85b8800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8800a85b8880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8800a85b8900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8800a85b8980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8800a85b8a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================