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. ======================================================= JBD2: Ignoring recovery information on journal ocfs2: Mounting device (7,0) on (node local, slot 0) with ordered data mode. (syz.0.0,5323,0):ocfs2_check_set_options:1244 ERROR: Invalid heartbeat mount options loop0: detected capacity change from 32768 to 32767 OCFS2: ERROR (device loop0): int ocfs2_validate_inode_block(struct super_block *, struct buffer_head *): Invalid dinode #17058: signature = ^·Š On-disk corruption discovered. Please run fsck.ocfs2 once the filesystem is unmounted. OCFS2: File system is now read-only. (syz.0.0,5323,0):ocfs2_assign_bh:2417 ERROR: status = -30 (syz.0.0,5323,0):ocfs2_inode_lock_full_nested:2512 ERROR: status = -30 (syz.0.0,5323,0):ocfs2_reflink_inodes_lock:4748 ERROR: status = -30 ================================================================== BUG: KASAN: use-after-free in memcpy_from_folio include/linux/highmem.h:586 [inline] BUG: KASAN: use-after-free in ocfs2_write_end_inline fs/ocfs2/aops.c:1915 [inline] BUG: KASAN: use-after-free in ocfs2_write_end_nolock+0xbd9/0x18f0 fs/ocfs2/aops.c:1949 Write of size 4086 at addr ffff88801fc574d2 by task syz.0.0/5323 CPU: 0 UID: 0 PID: 5323 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 04/01/2014 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xba/0x230 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x264/0x2c0 mm/kasan/generic.c:200 __asan_memcpy+0x40/0x70 mm/kasan/shadow.c:106 memcpy_from_folio include/linux/highmem.h:586 [inline] ocfs2_write_end_inline fs/ocfs2/aops.c:1915 [inline] ocfs2_write_end_nolock+0xbd9/0x18f0 fs/ocfs2/aops.c:1949 ocfs2_write_end+0x58/0x90 fs/ocfs2/aops.c:2059 generic_perform_write+0x620/0x8f0 mm/filemap.c:4345 ocfs2_file_write_iter+0x1663/0x1ed0 fs/ocfs2/file.c:2476 iter_file_splice_write+0x9a1/0x10f0 fs/splice.c:736 do_splice_from fs/splice.c:936 [inline] direct_splice_actor+0x101/0x160 fs/splice.c:1159 splice_direct_to_actor+0x53a/0xc70 fs/splice.c:1103 do_splice_direct_actor fs/splice.c:1202 [inline] do_splice_direct+0x195/0x290 fs/splice.c:1228 vfs_copy_file_range+0xb02/0x1370 fs/read_write.c:1634 __do_sys_copy_file_range fs/read_write.c:1683 [inline] __se_sys_copy_file_range+0x2fb/0x480 fs/read_write.c:1650 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f490039c819 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f490122ffe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000146 RAX: ffffffffffffffda RBX: 00007f4900615fa0 RCX: 00007f490039c819 RDX: 0000000000000004 RSI: 00002000000001c0 RDI: 0000000000000005 RBP: 00007f4900432c91 R08: ffffffffa003e45b R09: 0700000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f4900616038 R14: 00007f4900615fa0 R15: 00007ffd58ef4d38 The buggy address belongs to the physical page: page: refcount:2 mapcount:0 mapping:ffff88801cc2e6c8 index:0x854 pfn:0x1fc57 memcg:ffff88801c6c8d40 aops:def_blk_aops ino:700000 dentry name(?):"" flags: 0xfff58000004224(referenced|lru|workingset|private|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff58000004224 ffff88801c6dd4c0 ffff88801c6dd4c0 ffff88801cc2e6c8 raw: 0000000000000854 ffff888047a7eae0 00000002ffffffff ffff88801c6c8d40 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Movable, gfp_mask 0x148c48(GFP_NOFS|__GFP_MOVABLE|__GFP_NOFAIL|__GFP_COMP|__GFP_HARDWALL), pid 5323, tgid 5322 (syz.0.0), ts 103427369401, free_ts 103329718224 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x231/0x280 mm/page_alloc.c:1889 prep_new_page mm/page_alloc.c:1897 [inline] get_page_from_freelist+0x24dc/0x2580 mm/page_alloc.c:3962 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5250 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2490 alloc_frozen_pages_noprof mm/mempolicy.c:2561 [inline] alloc_pages_noprof+0xa8/0x1a0 mm/mempolicy.c:2581 folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2591 filemap_alloc_folio_noprof+0x111/0x470 mm/filemap.c:1013 __filemap_get_folio_mpol+0x3fc/0xb00 mm/filemap.c:2011 __filemap_get_folio include/linux/pagemap.h:763 [inline] grow_dev_folio fs/buffer.c:1047 [inline] grow_buffers fs/buffer.c:1113 [inline] __getblk_slow fs/buffer.c:1131 [inline] bdev_getblk+0x1f6/0x6e0 fs/buffer.c:1458 __getblk include/linux/buffer_head.h:380 [inline] sb_getblk include/linux/buffer_head.h:386 [inline] ocfs2_read_blocks+0x57e/0x15e0 fs/ocfs2/buffer_head_io.c:236 ocfs2_read_inode_block_full fs/ocfs2/inode.c:1745 [inline] ocfs2_read_inode_block+0xec/0x1d0 fs/ocfs2/inode.c:1759 ocfs2_assign_bh fs/ocfs2/dlmglue.c:2415 [inline] ocfs2_inode_lock_full_nested+0x2ac/0x1bd0 fs/ocfs2/dlmglue.c:2510 ocfs2_reflink_inodes_lock+0x477/0xc50 fs/ocfs2/refcounttree.c:4744 ocfs2_remap_file_range+0x236/0x6f0 fs/ocfs2/file.c:2721 vfs_copy_file_range+0xd80/0x1370 fs/read_write.c:1600 __do_sys_copy_file_range fs/read_write.c:1683 [inline] __se_sys_copy_file_range+0x2fb/0x480 fs/read_write.c:1650 page last free pid 74 tgid 74 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1433 [inline] free_unref_folios+0xed5/0x16d0 mm/page_alloc.c:3040 shrink_folio_list+0x4a6b/0x5290 mm/vmscan.c:1610 evict_folios+0x4795/0x5880 mm/vmscan.c:4718 try_to_shrink_lruvec+0xb62/0xfa0 mm/vmscan.c:4881 shrink_one+0x25c/0x710 mm/vmscan.c:4926 shrink_many mm/vmscan.c:4989 [inline] lru_gen_shrink_node mm/vmscan.c:5067 [inline] shrink_node+0x3197/0x3a90 mm/vmscan.c:6047 kswapd_shrink_node mm/vmscan.c:6894 [inline] balance_pgdat mm/vmscan.c:7070 [inline] kswapd+0x1742/0x2e10 mm/vmscan.c:7343 kthread+0x388/0x470 kernel/kthread.c:436 ret_from_fork+0x51e/0xb90 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff88801fc57f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88801fc57f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88801fc58000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88801fc58080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88801fc58100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================