loop0: detected capacity change from 0 to 32768 ======================================================= WARNING: The mand mount option has been deprecated and and is ignored by this kernel. Remove the mand option from the mount to silence this warning. ======================================================= XFS (loop0): Mounting V5 Filesystem bfdc47fc-10d8-4eed-a562-11a831b3f791 XFS (loop0): Metadata CRC error detected at xfs_agf_read_verify+0x12f/0x1f0 fs/xfs/libxfs/xfs_alloc.c:3319, xfs_agf block 0x1 XFS (loop0): Unmount and run xfs_repair XFS (loop0): First 128 bytes of corrupted metadata buffer: 00000000: 58 41 47 46 00 00 00 01 00 00 00 00 00 00 20 00 XAGF.......... . 00000010: 00 00 00 01 00 00 00 02 00 00 00 05 00 00 00 01 ................ 00000020: 00 00 00 05 00 00 00 01 00 00 00 01 00 00 00 06 ................ 00000030: 00 00 00 06 00 00 0d cb 00 00 0d b8 00 00 00 00 ................ 00000040: bf dc 47 fc 10 d8 4e ed a5 62 11 a8 31 b3 f7 91 ..G...N..b..1... 00000050: 00 00 00 01 00 00 00 01 00 00 00 06 00 00 00 01 ................ 00000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ XFS (loop0): metadata I/O error in "xfs_read_agf+0x281/0x5c0" at daddr 0x1 len 1 error 74 XFS (loop0): Error -117 reserving per-AG metadata reserve pool. XFS (loop0): Corruption of in-memory data (0x8) detected at xfs_fs_reserve_ag_blocks+0x1f0/0x240 fs/xfs/xfs_fsops.c:566 (fs/xfs/xfs_fsops.c:566). Shutting down filesystem. XFS (loop0): Please unmount the filesystem and rectify the problem(s) XFS (loop0): Ending clean mount XFS (loop0): Failed to initialize disk quotas, err -5. XFS (loop0): Error -5 reserving per-AG metadata reserve pool. loop0: detected capacity change from 0 to 32768 ================================================================== BUG: KASAN: slab-use-after-free in drop_metapage fs/jfs/jfs_metapage.c:311 [inline] BUG: KASAN: slab-use-after-free in release_metapage+0x760/0xac0 fs/jfs/jfs_metapage.c:892 Read of size 8 at addr ffff88801a2edcc0 by task syz.0.0/5358 CPU: 0 UID: 0 PID: 5358 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 drop_metapage fs/jfs/jfs_metapage.c:311 [inline] release_metapage+0x760/0xac0 fs/jfs/jfs_metapage.c:892 write_metapage fs/jfs/jfs_metapage.h:75 [inline] flush_metapage fs/jfs/jfs_metapage.h:81 [inline] ea_put fs/jfs/xattr.c:623 [inline] __jfs_setxattr+0xa6e/0x1120 fs/jfs/xattr.c:792 __jfs_xattr_set+0xda/0x170 fs/jfs/xattr.c:941 __vfs_setxattr+0x439/0x480 fs/xattr.c:200 __vfs_setxattr_noperm+0x12d/0x660 fs/xattr.c:234 vfs_setxattr+0x16b/0x2f0 fs/xattr.c:321 do_setxattr fs/xattr.c:636 [inline] filename_setxattr+0x274/0x600 fs/xattr.c:665 path_setxattrat+0x364/0x3a0 fs/xattr.c:713 __do_sys_lsetxattr fs/xattr.c:754 [inline] __se_sys_lsetxattr fs/xattr.c:750 [inline] __x64_sys_lsetxattr+0xbf/0xe0 fs/xattr.c:750 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f412598ebe9 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:00007f412682f038 EFLAGS: 00000246 ORIG_RAX: 00000000000000bd RAX: ffffffffffffffda RBX: 00007f4125bb5fa0 RCX: 00007f412598ebe9 RDX: 00002000000002c0 RSI: 0000200000000280 RDI: 00002000000000c0 RBP: 00007f4125a11e19 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000002 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f4125bb6038 R14: 00007f4125bb5fa0 R15: 00007ffe58c13c38 Allocated by task 5358: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:330 [inline] __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:356 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4180 [inline] slab_alloc_node mm/slub.c:4229 [inline] kmem_cache_alloc_noprof+0x1c1/0x3c0 mm/slub.c:4236 mempool_alloc_noprof+0x1a4/0x510 mm/mempool.c:406 alloc_metapage fs/jfs/jfs_metapage.c:264 [inline] __get_metapage+0x509/0xde0 fs/jfs/jfs_metapage.c:760 ea_get+0xb8e/0x1330 fs/jfs/xattr.c:528 __jfs_setxattr+0x57c/0x1120 fs/jfs/xattr.c:727 __jfs_xattr_set+0xda/0x170 fs/jfs/xattr.c:941 __vfs_setxattr+0x439/0x480 fs/xattr.c:200 __vfs_setxattr_noperm+0x12d/0x660 fs/xattr.c:234 vfs_setxattr+0x16b/0x2f0 fs/xattr.c:321 do_setxattr fs/xattr.c:636 [inline] filename_setxattr+0x274/0x600 fs/xattr.c:665 path_setxattrat+0x364/0x3a0 fs/xattr.c:713 __do_sys_lsetxattr fs/xattr.c:754 [inline] __se_sys_lsetxattr fs/xattr.c:750 [inline] __x64_sys_lsetxattr+0xbf/0xe0 fs/xattr.c:750 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 77: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:243 [inline] __kasan_slab_free+0x5b/0x80 mm/kasan/common.c:275 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2417 [inline] slab_free mm/slub.c:4680 [inline] kmem_cache_free+0x18f/0x400 mm/slub.c:4782 free_metapage fs/jfs/jfs_metapage.c:279 [inline] metapage_release_folio+0x40e/0x540 fs/jfs/jfs_metapage.c:636 shrink_folio_list+0x20ac/0x4cd0 mm/vmscan.c:1518 evict_folios+0x47f2/0x58b0 mm/vmscan.c:4744 try_to_shrink_lruvec+0x8a3/0xb50 mm/vmscan.c:4907 shrink_one+0x21b/0x7c0 mm/vmscan.c:4952 shrink_many mm/vmscan.c:5015 [inline] lru_gen_shrink_node mm/vmscan.c:5093 [inline] shrink_node+0x314e/0x3760 mm/vmscan.c:6078 kswapd_shrink_node mm/vmscan.c:6938 [inline] balance_pgdat mm/vmscan.c:7121 [inline] kswapd+0x147c/0x2830 mm/vmscan.c:7386 kthread+0x70e/0x8a0 kernel/kthread.c:463 ret_from_fork+0x3f9/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address belongs to the object at ffff88801a2edc98 which belongs to the cache jfs_mp of size 184 The buggy address is located 40 bytes inside of freed 184-byte region [ffff88801a2edc98, ffff88801a2edd50) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1a2ed flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88801c7d5b40 dead000000000122 0000000000000000 raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0xd2800(GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5358, tgid 5357 (syz.0.0), ts 77287780375, free_ts 77264259065 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1851 prep_new_page mm/page_alloc.c:1859 [inline] get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3858 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5148 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:2487 [inline] allocate_slab+0x8a/0x370 mm/slub.c:2655 new_slab mm/slub.c:2709 [inline] ___slab_alloc+0xbeb/0x1410 mm/slub.c:3891 __slab_alloc mm/slub.c:3981 [inline] __slab_alloc_node mm/slub.c:4056 [inline] slab_alloc_node mm/slub.c:4217 [inline] kmem_cache_alloc_noprof+0x283/0x3c0 mm/slub.c:4236 mempool_alloc_noprof+0x1a4/0x510 mm/mempool.c:406 alloc_metapage fs/jfs/jfs_metapage.c:264 [inline] __get_metapage+0x509/0xde0 fs/jfs/jfs_metapage.c:760 diReadSpecial+0x25b/0x710 fs/jfs/jfs_imap.c:447 jfs_mount+0x73/0x870 fs/jfs/jfs_mount.c:87 jfs_fill_super+0x6bc/0xd80 fs/jfs/super.c:523 get_tree_bdev_flags+0x40b/0x4d0 fs/super.c:1692 vfs_get_tree+0x92/0x2b0 fs/super.c:1815 do_new_mount+0x2a2/0x9e0 fs/namespace.c:3808 do_mount fs/namespace.c:4136 [inline] __do_sys_mount fs/namespace.c:4347 [inline] __se_sys_mount+0x317/0x410 fs/namespace.c:4324 page last free pid 15 tgid 15 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0xbc4/0xd30 mm/page_alloc.c:2895 pagetable_free include/linux/mm.h:2898 [inline] pagetable_dtor_free include/linux/mm.h:2996 [inline] __tlb_remove_table+0x2d2/0x3b0 include/asm-generic/tlb.h:220 __tlb_remove_table_free mm/mmu_gather.c:227 [inline] tlb_remove_table_rcu+0x85/0x100 mm/mmu_gather.c:290 rcu_do_batch kernel/rcu/tree.c:2605 [inline] rcu_core+0xcab/0x1770 kernel/rcu/tree.c:2861 handle_softirqs+0x283/0x870 kernel/softirq.c:579 run_ksoftirqd+0x9b/0x100 kernel/softirq.c:968 smpboot_thread_fn+0x53f/0xa60 kernel/smpboot.c:160 kthread+0x70e/0x8a0 kernel/kthread.c:463 ret_from_fork+0x3f9/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff88801a2edb80: fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 00 ffff88801a2edc00: 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc >ffff88801a2edc80: fc fc fc fa fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88801a2edd00: fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc ffff88801a2edd80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================